Alexandre Julliard : user32/tests: Fix a couple of test failures on Windows .

Alexandre Julliard julliard at winehq.org
Tue Apr 14 15:59:58 CDT 2009


Module: wine
Branch: master
Commit: 287d22eba331d16cb46e497cfc994207c2763a61
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=287d22eba331d16cb46e497cfc994207c2763a61

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri Apr 10 20:45:08 2009 +0200

user32/tests: Fix a couple of test failures on Windows.

---

 dlls/user32/tests/win.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c
index 4aa3674..1f0420e 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -2662,7 +2662,10 @@ static void test_keyboard_input(HWND hwnd)
     ok(GetFocus() == hwnd, "wrong focus window %p\n", GetFocus());
 
     keybd_event(VK_SPACE, 0, 0, 0);
-    ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE);
+    do
+    {
+        ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE);
+    } while (ret && msg.message >= 0xc000);
     if (!ret)
     {
         skip( "keybd_event didn't work, skipping keyboard test\n" );
@@ -4930,7 +4933,10 @@ static void test_GetWindowModuleFileName(void)
         ok(IsWindow(hwnd), "got invalid desktop window %p\n", hwnd);
         SetLastError(0xdeadbeef);
         ret2 = pGetWindowModuleFileNameA(hwnd, buf2, sizeof(buf2));
-        ok(!ret2 || ret1 == ret2 /* vista */, "expected 0 or %u, got %u %s\n", ret1, ret2, buf2);
+        ok(!ret2 ||
+           ret1 == ret2 || /* vista */
+           broken(ret2),  /* some win98 return user.exe as file name */
+           "expected 0 or %u, got %u %s\n", ret1, ret2, buf2);
     }
 }
 




More information about the wine-cvs mailing list