Paul Vriens : kernel32/tests: Fix crash on NT4 and higher.
Alexandre Julliard
julliard at winehq.org
Thu Mar 26 11:05:49 CDT 2009
Module: wine
Branch: master
Commit: 9e82e50eb3fc444062203ae4a167ffb574ba4239
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9e82e50eb3fc444062203ae4a167ffb574ba4239
Author: Paul Vriens <Paul.Vriens.Wine at gmail.com>
Date: Wed Mar 25 17:14:25 2009 +0100
kernel32/tests: Fix crash on NT4 and higher.
---
dlls/kernel32/tests/profile.c | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/dlls/kernel32/tests/profile.c b/dlls/kernel32/tests/profile.c
index 7b57699..5651deb 100644
--- a/dlls/kernel32/tests/profile.c
+++ b/dlls/kernel32/tests/profile.c
@@ -860,13 +860,16 @@ static void test_WritePrivateProfileString(void)
ok(check_file_data(path, data), "File doesn't match\n");
DeleteFileA(path);
- /* empty lpAppName */
+ if (0)
+ {
+ /* empty lpAppName, crashes on NT4 and higher */
data = "[]\r\n"
"key=string\r\n";
ret = WritePrivateProfileStringA("", "key", "string", path);
ok(ret == TRUE, "Expected TRUE, got %d\n", ret);
ok(check_file_data(path, data), "File doesn't match\n");
DeleteFileA(path);
+ }
/* NULL lpKeyName */
data = "";
@@ -878,7 +881,9 @@ static void test_WritePrivateProfileString(void)
}
DeleteFileA(path);
- /* empty lpKeyName */
+ if (0)
+ {
+ /* empty lpKeyName, crashes on NT4 and higher */
data = "[App]\r\n"
"=string\r\n";
ret = WritePrivateProfileStringA("App", "", "string", path);
@@ -888,6 +893,7 @@ static void test_WritePrivateProfileString(void)
ok(check_file_data(path, data), "File doesn't match\n");
}
DeleteFileA(path);
+ }
/* NULL lpString */
data = "";
@@ -904,10 +910,7 @@ static void test_WritePrivateProfileString(void)
"key=\r\n";
ret = WritePrivateProfileStringA("App", "key", "", path);
ok(ret == TRUE, "Expected TRUE, got %d\n", ret);
- todo_wine
- {
- ok(check_file_data(path, data), "File doesn't match\n");
- }
+ ok(check_file_data(path, data), "File doesn't match\n");
DeleteFileA(path);
/* empty lpFileName */
More information about the wine-cvs
mailing list