James Hawkins wrote:
> ---
> dlls/kernel32/tests/profile.c | 227 +++++++++++++++++++++++++++++++++++++++++
> 1 files changed, 227 insertions(+), 0 deletions(-)
>
>
> ------------------------------------------------------------------------
>
>
Two of these new tests crash on Windows (see attached patch for a "fix" on Windows).
Applying the patch triggers a failure on Wine though, which is very weird.
--
Cheers,
Paul.
diff --git a/dlls/kernel32/tests/profile.c b/dlls/kernel32/tests/profile.c
index 7b57699..9dd551f 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 Windows */
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 Windows */
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 = "";