Allowed to return NULL in StartupInfoA dlls/kernel/tests/process.c

Jakob Eriksson jakov at vmlinux.org
Wed Dec 29 10:20:51 CST 2004



Windows 98 does return NULL in StartupInfoA:lpDesktop and lpTitle.


http://test.winehq.org/data/200412281000/98/kernel32:process.txt
-------------- next part --------------
Index: dlls/kernel/tests/process.c
===================================================================
RCS file: /home/wine/wine/dlls/kernel/tests/process.c,v
retrieving revision 1.19
diff -u -r1.19 process.c
--- dlls/kernel/tests/process.c	27 Dec 2004 17:26:38 -0000	1.19
+++ dlls/kernel/tests/process.c	29 Dec 2004 16:19:10 -0000
@@ -410,6 +410,12 @@
         ok(strCmp(result, expect, 1) == 0, "%s:%s expected '%s', got '%s'\n", (sect), (key), (expect)?(expect):"(null)", result); \
     } while (0)
 
+#define okChildStringOrNull(sect, key, expect) \
+    do { \
+        char* result = getChildString((sect), (key)); \
+        ok((strCmp(result, expect, 1) == 0) || NULL == result, "%s:%s expected '%s', got '%s'\n", (sect), (key), (expect)?(expect):"(null)", result); \
+    } while (0)
+
 #define okChildIString(sect, key, expect) \
     do { \
         char* result = getChildString(sect, key); \
@@ -561,7 +567,8 @@
     WritePrivateProfileStringA(NULL, NULL, NULL, resfile);
 
     okChildInt("StartupInfoA", "cb", startup.cb);
-    todo_wine okChildString("StartupInfoA", "lpDesktop", startup.lpDesktop);
+    todo_wine okChildStringOrNull("StartupInfoA", "lpDesktop", startup.lpDesktop);
+
     okChildString("StartupInfoA", "lpTitle", startup.lpTitle);
     okChildInt("StartupInfoA", "dwX", startup.dwX);
     okChildInt("StartupInfoA", "dwY", startup.dwY);
@@ -638,7 +645,7 @@
 
     okChildInt("StartupInfoA", "cb", startup.cb);
     okChildString("StartupInfoA", "lpDesktop", startup.lpDesktop);
-    todo_wine okChildString("StartupInfoA", "lpTitle", startup.lpTitle);
+    todo_wine okChildStringOrNull("StartupInfoA", "lpTitle", startup.lpTitle);
     okChildInt("StartupInfoA", "dwX", startup.dwX);
     okChildInt("StartupInfoA", "dwY", startup.dwY);
     okChildInt("StartupInfoA", "dwXSize", startup.dwXSize);
@@ -675,8 +682,8 @@
     WritePrivateProfileStringA(NULL, NULL, NULL, resfile);
 
     okChildInt("StartupInfoA", "cb", startup.cb);
-    todo_wine okChildString("StartupInfoA", "lpDesktop", startup.lpDesktop);
-    todo_wine okChildString("StartupInfoA", "lpTitle", startup.lpTitle);
+    todo_wine okChildStringOrNull("StartupInfoA", "lpDesktop", startup.lpDesktop);
+    todo_wine okChildStringOrNull("StartupInfoA", "lpTitle", startup.lpTitle);
     okChildInt("StartupInfoA", "dwX", startup.dwX);
     okChildInt("StartupInfoA", "dwY", startup.dwY);
     okChildInt("StartupInfoA", "dwXSize", startup.dwXSize);


More information about the wine-patches mailing list