Jeremy White : winspool: Add tests for paths returned in GetPrinterDriver.

Alexandre Julliard julliard at winehq.org
Wed Dec 16 09:41:33 CST 2009


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

Author: Jeremy White <jwhite at codeweavers.com>
Date:   Tue Dec 15 20:33:45 2009 -0600

winspool: Add tests for paths returned in GetPrinterDriver.

---

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

diff --git a/dlls/winspool.drv/tests/info.c b/dlls/winspool.drv/tests/info.c
index 1f876b3..5ab0ccd 100644
--- a/dlls/winspool.drv/tests/info.c
+++ b/dlls/winspool.drv/tests/info.c
@@ -2370,6 +2370,7 @@ static void test_GetPrinterDriver(void)
         {
             DRIVER_INFO_2 *di_2 = (DRIVER_INFO_2 *)buf;
             DWORD calculated = sizeof(*di_2);
+            HANDLE hf;
 
             /* MSDN is wrong: The Drivers on the win9x-CD's have cVersion=0x0400
                NT351: 1, NT4.0+w2k(Kernelmode): 2, w2k and above(Usermode): 3  */
@@ -2393,6 +2394,24 @@ static void test_GetPrinterDriver(void)
             trace("pConfigFile %s\n", di_2->pConfigFile);
             calculated += strlen(di_2->pConfigFile) + 1;
 
+            hf = CreateFileA(di_2->pDriverPath, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+            if(hf != INVALID_HANDLE_VALUE)
+                CloseHandle(hf);
+            todo_wine
+            ok(hf != INVALID_HANDLE_VALUE, "Could not open %s\n", di_2->pDriverPath);
+
+            hf = CreateFileA(di_2->pDataFile, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+            if(hf != INVALID_HANDLE_VALUE)
+                CloseHandle(hf);
+            todo_wine
+            ok(hf != INVALID_HANDLE_VALUE, "Could not open %s\n", di_2->pDataFile);
+
+            hf = CreateFileA(di_2->pConfigFile, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+            if(hf != INVALID_HANDLE_VALUE)
+                CloseHandle(hf);
+            todo_wine
+            ok(hf != INVALID_HANDLE_VALUE, "Could not open %s\n", di_2->pConfigFile);
+
             /* XP allocates memory for both ANSI and unicode names */
             ok(filled >= calculated,"calculated %d != filled %d\n", calculated, filled);
         }




More information about the wine-cvs mailing list