[winspool.drv/tests] Skip EnumPrintersW tests when not implemented

Paul Vriens paul.vriens.wine at gmail.com
Sat Dec 30 11:13:08 CST 2006


Hi,

EnumPrintersW is not implemented on my Win98 box.

Changelog
  Skip EnumPrintersW tests when not implemented

Cheers,

Paul.
---
 dlls/winspool.drv/tests/info.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/dlls/winspool.drv/tests/info.c b/dlls/winspool.drv/tests/info.c
index c7f6634..3bf59aa 100644
--- a/dlls/winspool.drv/tests/info.c
+++ b/dlls/winspool.drv/tests/info.c
@@ -1670,6 +1670,13 @@ static void test_EnumPrinters(void)
     SetLastError(0xdeadbeef);
     neededW = -1;
     ret = EnumPrintersW(PRINTER_ENUM_LOCAL, NULL, 2, NULL, 0, &neededW, &num);
+    /* EnumPrintersW is not supported on all platforms */
+    if (!ret && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED))
+    {
+        trace("EnumPrintersW is not implemented, skipping some tests\n");
+        return;
+    }
+
     if (!ret)
     {
         /* We have 1 or more printers */
-- 
1.4.4.3




More information about the wine-patches mailing list