From 159506893b9ce29912831ed018b1ff689aefbde8 Mon Sep 17 00:00:00 2001 From: Paul Vriens Date: Tue, 10 Nov 2009 14:29:12 +0100 Subject: [PATCH] kernel32/tests: Fix some test failures on Win9x/WinMe. --- dlls/kernel32/tests/file.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/dlls/kernel32/tests/file.c b/dlls/kernel32/tests/file.c index 0a9152e6d67..ec61659ad0b 100644 --- a/dlls/kernel32/tests/file.c +++ b/dlls/kernel32/tests/file.c @@ -650,8 +650,10 @@ static void test_CopyFileA(void) ret = CopyFileA(source, dest, FALSE); todo_wine { - ok(!ret && GetLastError() == ERROR_USER_MAPPED_FILE, - "CopyFileA with mapped dest file: expected ERROR_USER_MAPPED_FILE, got %d\n", GetLastError()); + ok(!ret, "CopyFileA: expected failure\n"); + ok(GetLastError() == ERROR_USER_MAPPED_FILE || + broken(GetLastError() == ERROR_SHARING_VIOLATION), /* Win9x and WinMe */ + "CopyFileA with mapped dest file: expected ERROR_USER_MAPPED_FILE, got %d\n", GetLastError()); } CloseHandle(hmapfile); @@ -1325,7 +1327,9 @@ static void test_MoveFileA(void) ret = MoveFileA(source, dest); todo_wine { ok(!ret, "MoveFileA: expected failure\n"); - ok(GetLastError() == ERROR_SHARING_VIOLATION, "MoveFileA: expected ERROR_SHARING_VIOLATION, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_SHARING_VIOLATION || + broken(GetLastError() == ERROR_ACCESS_DENIED), /* Win9x and WinMe */ + "MoveFileA: expected ERROR_SHARING_VIOLATION, got %d\n", GetLastError()); } CloseHandle(hmapfile); @@ -1343,7 +1347,9 @@ static void test_MoveFileA(void) ret = MoveFileA(source, dest); todo_wine { ok(!ret, "MoveFileA: expected failure\n"); - ok(GetLastError() == ERROR_SHARING_VIOLATION, "MoveFileA: expected ERROR_SHARING_VIOLATION, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_SHARING_VIOLATION || + broken(GetLastError() == ERROR_ACCESS_DENIED), /* Win9x and WinMe */ + "MoveFileA: expected ERROR_SHARING_VIOLATION, got %d\n", GetLastError()); } CloseHandle(hmapfile);