winspool.drv/tests: Fix test failures on XP+ with long printer names.

This commit is contained in:
Paul Vriens 2009-12-08 10:25:18 +01:00 committed by Alexandre Julliard
parent 72c54e5d3b
commit 5719881ed5
1 changed files with 2 additions and 1 deletions

View File

@ -2412,7 +2412,8 @@ static void test_DEVMODE(const DEVMODE *dm, LONG dmSize, LPCSTR exp_prn_name)
We skip the Tests on this Platform */
if (dm->dmSpecVersion || dm->dmDriverVersion || dm->dmDriverExtra) {
/* The 0-terminated Printername can be larger (MAX_PATH) than CCHDEVICENAME */
ok(!strncmp(exp_prn_name, (LPCSTR)dm->dmDeviceName, CCHDEVICENAME -1),
ok(!strncmp(exp_prn_name, (LPCSTR)dm->dmDeviceName, CCHDEVICENAME -1) ||
!strncmp(exp_prn_name, (LPCSTR)dm->dmDeviceName, CCHDEVICENAME -2), /* XP+ */
"expected '%s', got '%s'\n", exp_prn_name, dm->dmDeviceName);
ok(dm->dmSize + dm->dmDriverExtra == dmSize,
"%u != %d\n", dm->dmSize + dm->dmDriverExtra, dmSize);