[winspool 8/8] Add a test which shows the flaws in the current all enumeration.
Jeremy White
jwhite at winehq.org
Mon Nov 30 17:05:23 CST 2009
---
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 85bcf36..7691a30 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);
}
--
1.5.6.5
More information about the wine-patches
mailing list