Commit e9cd221e authored by Paul Vriens's avatar Paul Vriens Committed by Alexandre Julliard

winspool/tests: Don't treat having no printers as a failure.

parent 7dd80669
......@@ -1637,15 +1637,37 @@ static void test_EnumPrinters(void)
DWORD ret;
SetLastError(0xdeadbeef);
neededA = -1;
ret = EnumPrintersA(PRINTER_ENUM_LOCAL, NULL, 2, NULL, 0, &neededA, &num);
ok(ret == 0, "ret %d\n", ret);
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "gle %d\n", GetLastError());
if (!ret)
{
/* We have 1 or more printers */
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "gle %d\n", GetLastError());
ok(neededA > 0, "Expected neededA to show the number of needed bytes\n");
}
else
{
/* We don't have any printers defined */
ok(GetLastError() == S_OK, "gle %d\n", GetLastError());
ok(neededA == 0, "Expected neededA to be zero\n");
}
ok(num == 0, "num %d\n", num);
SetLastError(0xdeadbeef);
neededW = -1;
ret = EnumPrintersW(PRINTER_ENUM_LOCAL, NULL, 2, NULL, 0, &neededW, &num);
ok(ret == 0, "ret %d\n", ret);
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "gle %d\n", GetLastError());
if (!ret)
{
/* We have 1 or more printers */
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "gle %d\n", GetLastError());
ok(neededW > 0, "Expected neededW to show the number of needed bytes\n");
}
else
{
/* We don't have any printers defined */
ok(GetLastError() == S_OK, "gle %d\n", GetLastError());
ok(neededW == 0, "Expected neededW to be zero\n");
}
ok(num == 0, "num %d\n", num);
/* Outlook2003 relies on the buffer size returned by EnumPrintersA being big enough
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment