Module: wine Branch: master Commit: 407f0d9f5609903d5929a78bbd8368dd26ea5e19 URL: http://source.winehq.org/git/wine.git/?a=commit;h=407f0d9f5609903d5929a78bbd...
Author: Paul Vriens Paul.Vriens.Wine@gmail.com Date: Wed Jan 28 21:54:41 2009 +0100
kernel32/tests: Fix some test failures on Win9x and WinME (GetPrivateProfileString).
---
dlls/kernel32/tests/profile.c | 16 ++++++++++++---- 1 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/dlls/kernel32/tests/profile.c b/dlls/kernel32/tests/profile.c index 303b2d2..154d6cf 100644 --- a/dlls/kernel32/tests/profile.c +++ b/dlls/kernel32/tests/profile.c @@ -509,7 +509,9 @@ static void test_GetPrivateProfileString(const char *content, const char *descri ret = GetPrivateProfileStringA(emptystr, "name1", NULL, buf, MAX_PATH, filename); ok(ret == 0, "Expected 0, got %d\n", ret); - ok(!lstrcmpA(buf, ""), "Expected "", got "%s"\n", buf); + ok(!lstrcmpA(buf, "") || + broken(!lstrcmpA(buf, "kumquat")), /* Win9x, WinME */ + "Expected "", got "%s"\n", buf); ok(emptystr_ok(emptystr), "AppName modified\n");
/* lpAppName is empty, lpDefault is empty */ @@ -576,7 +578,9 @@ static void test_GetPrivateProfileString(const char *content, const char *descri ret = GetPrivateProfileStringA("section1", emptystr, NULL, buf, MAX_PATH, filename); ok(ret == 0, "Expected 0, got %d\n", ret); - ok(!lstrcmpA(buf, ""), "Expected "", got "%s"\n", buf); + ok(!lstrcmpA(buf, "") || + broken(!lstrcmpA(buf, "kumquat")), /* Win9x, WinME */ + "Expected "", got "%s"\n", buf); ok(emptystr_ok(emptystr), "KeyName modified\n");
/* lpKeyName is empty, lpDefault is empty */ @@ -608,8 +612,12 @@ static void test_GetPrivateProfileString(const char *content, const char *descri lstrcpyA(buf, "kumquat"); ret = GetPrivateProfileStringA("section1", "name1", "default", buf, MAX_PATH, NULL); - ok(ret == 7, "Expected 7, got %d\n", ret); - ok(!lstrcmpA(buf, "default"), "Expected "default", got "%s"\n", buf); + ok(ret == 7 || + broken(ret == 0), /* Win9x, WinME */ + "Expected 7, got %d\n", ret); + ok(!lstrcmpA(buf, "default") || + broken(!lstrcmpA(buf, "kumquat")), /* Win9x, WinME */ + "Expected "default", got "%s"\n", buf);
/* lpFileName is empty */ lstrcpyA(buf, "kumquat");