kernel32/tests: Fix some test failures on NT4 and below.

This commit is contained in:
Paul Vriens 2009-03-27 11:46:25 +01:00 committed by Alexandre Julliard
parent 21186d5a69
commit 7eca8022df

View File

@ -843,7 +843,9 @@ static void test_WritePrivateProfileString(void)
SetLastError(0xdeadbeef);
ret = WritePrivateProfileStringA(NULL, "key", "string", path);
ok(ret == FALSE, "Expected FALSE, got %d\n", ret);
ok(GetLastError() == ERROR_FILE_NOT_FOUND,
ok(GetLastError() == ERROR_FILE_NOT_FOUND ||
broken(GetLastError() == ERROR_INVALID_PARAMETER) || /* NT4 */
broken(GetLastError() == 0xdeadbeef), /* Win9x and WinME */
"Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError());
ok(GetFileAttributesA(path) == INVALID_FILE_ATTRIBUTES,
"Expected path to not exist\n");
@ -855,7 +857,9 @@ static void test_WritePrivateProfileString(void)
SetLastError(0xdeadbeef);
ret = WritePrivateProfileStringA(NULL, "key", "string", path);
ok(ret == FALSE, "Expected FALSE, got %d\n", ret);
ok(GetLastError() == ERROR_FILE_NOT_FOUND,
ok(GetLastError() == ERROR_FILE_NOT_FOUND ||
broken(GetLastError() == ERROR_INVALID_PARAMETER) || /* NT4 */
broken(GetLastError() == 0xdeadbeef), /* Win9x and WinME */
"Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError());
ok(check_file_data(path, data), "File doesn't match\n");
DeleteFileA(path);