Paul Vriens : kernel32/tests: Fix remaining failures on Win9x and WinME.
Module: wine Branch: master Commit: 047a43f084135a188f7b691f345137e3c2a5ee18 URL: http://source.winehq.org/git/wine.git/?a=commit;h=047a43f084135a188f7b691f34... Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Sat Jan 31 15:37:59 2009 +0100 kernel32/tests: Fix remaining failures on Win9x and WinME. --- dlls/kernel32/tests/profile.c | 15 ++++++++++++--- 1 files changed, 12 insertions(+), 3 deletions(-) diff --git a/dlls/kernel32/tests/profile.c b/dlls/kernel32/tests/profile.c index 24342da..2e5678c 100644 --- a/dlls/kernel32/tests/profile.c +++ b/dlls/kernel32/tests/profile.c @@ -402,8 +402,11 @@ static void test_profile_delete_on_close(void) "Cannot write test file: %x\n", GetLastError() ); ok( size == sizeof contents - 1, "Test file: partial write\n"); + SetLastError(0xdeadbeef); res = GetPrivateProfileInt(SECTION, KEY, 0, testfile); - ok( res == 123, "Got %d instead of 123\n", res); + ok( res == 123 || + broken(res == 0 && GetLastError() == ERROR_SHARING_VIOLATION), /* Win9x, WinME */ + "Got %d instead of 123\n", res); /* This also deletes the file */ CloseHandle(h); @@ -423,8 +426,11 @@ static void test_profile_refresh(void) "Cannot write test file: %x\n", GetLastError() ); ok( size == sizeof contents1 - 1, "Test file: partial write\n"); + SetLastError(0xdeadbeef); res = GetPrivateProfileInt(SECTION, KEY, 0, testfile); - ok( res == 123, "Got %d instead of 123\n", res); + ok( res == 123 || + broken(res == 0 && GetLastError() == ERROR_SHARING_VIOLATION), /* Win9x, WinME */ + "Got %d instead of 123\n", res); CloseHandle(h); @@ -436,8 +442,11 @@ static void test_profile_refresh(void) "Cannot write test file: %x\n", GetLastError() ); ok( size == sizeof contents2 - 1, "Test file: partial write\n"); + SetLastError(0xdeadbeef); res = GetPrivateProfileInt(SECTION, KEY, 0, testfile); - ok( res == 124, "Got %d instead of 124\n", res); + ok( res == 124 || + broken(res == 0 && GetLastError() == 0xdeadbeef), /* Win9x, WinME */ + "Got %d instead of 124\n", res); /* This also deletes the file */ CloseHandle(h);
participants (1)
-
Alexandre Julliard