Jeremy White : winspool: Add a test which shows the flaws in the current all enumeration.

Alexandre Julliard julliard at winehq.org
Tue Dec 1 09:19:42 CST 2009


Module: wine
Branch: master
Commit: 0506d3cdc0ec6e6af4a7f864cca92b9cc8f94c6d
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=0506d3cdc0ec6e6af4a7f864cca92b9cc8f94c6d

Author: Jeremy White <jwhite at winehq.org>
Date:   Mon Nov 30 17:05:23 2009 -0600

winspool: Add a test which shows the flaws in the current all enumeration.

---

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

diff --git a/dlls/winspool.drv/tests/info.c b/dlls/winspool.drv/tests/info.c
index fedfb7e..7d2631f 100644
--- a/dlls/winspool.drv/tests/info.c
+++ b/dlls/winspool.drv/tests/info.c
@@ -1245,6 +1245,15 @@ static void test_EnumPrinterDrivers(void)
     buffer = HeapAlloc(GetProcessHeap(), 0, pcbNeeded);
     res = EnumPrinterDriversA(NULL, env_all, 1, buffer, pcbNeeded, &pcbNeeded, &pcReturned);
     ok(res, "EnumPrinterDriversA failed %u\n", GetLastError());
+    if (res && pcReturned > 0)
+    {
+        DRIVER_INFO_1 *di_1 = (DRIVER_INFO_1 *)buffer;
+        todo_wine
+        ok((LPBYTE) di_1->pName == NULL || (LPBYTE) di_1->pName < buffer ||
+            (LPBYTE) di_1->pName >= (LPBYTE)(di_1 + pcReturned),
+            "Driver Information not in sequence; pName %p, top of data %p\n",
+            di_1->pName, di_1 + pcReturned);
+    }
 
     HeapFree(GetProcessHeap(), 0, buffer);
 }




More information about the wine-cvs mailing list