Rémi Bernon : user32/tests: Skip tests expecting ascii VK wparam on non-us keyboards.

Alexandre Julliard julliard at winehq.org
Wed Nov 6 16:54:29 CST 2019


Module: wine
Branch: master
Commit: e83486062d7f0de23aa2c24ae1583c1a070a3746
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=e83486062d7f0de23aa2c24ae1583c1a070a3746

Author: Rémi Bernon <rbernon at codeweavers.com>
Date:   Tue Nov  5 20:44:50 2019 +0100

user32/tests: Skip tests expecting ascii VK wparam on non-us keyboards.

Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/user32/tests/msg.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
index 43c1859e04..6d8add4e0e 100644
--- a/dlls/user32/tests/msg.c
+++ b/dlls/user32/tests/msg.c
@@ -9179,6 +9179,7 @@ static void test_accelerators(void)
     HACCEL hAccel;
     HWND hwnd = CreateWindowExA(0, "TestWindowClass", NULL, WS_OVERLAPPEDWINDOW | WS_VISIBLE,
                                 100, 100, 200, 200, 0, 0, 0, NULL);
+    BOOL us_kbd = (GetKeyboardLayout(0) == (HKL)(ULONG_PTR)0x04090409);
     BOOL ret;
 
     assert(hwnd != 0);
@@ -9201,6 +9202,12 @@ static void test_accelerators(void)
     pump_msg_loop(hwnd, 0);
     flush_sequence();
 
+    if (!us_kbd)
+    {
+        skip("skipping ascii VK events on non-us keyboard\n");
+        goto done;
+    }
+
     trace("testing VK_N press/release\n");
     flush_sequence();
     keybd_event('N', 0, 0, 0);
@@ -15247,6 +15254,7 @@ static void test_menu_messages(void)
     HMENU hmenu, hmenu_popup;
     HWND hwnd;
     DWORD style;
+    BOOL us_kbd = (GetKeyboardLayout(0) == (HKL)(ULONG_PTR)0x04090409);
 
     if (!pGetMenuInfo || !pSetMenuInfo)
     {
@@ -15293,6 +15301,12 @@ static void test_menu_messages(void)
     style = get_menu_style(hmenu_popup);
     ok(style == 0, "expected 0, got %u\n", style);
 
+    if (!us_kbd)
+    {
+        skip("skipping ascii VK events on non-us keyboard\n");
+        goto done;
+    }
+
     /* Alt+E, Enter */
     trace("testing a popup menu command\n");
     flush_sequence();




More information about the wine-cvs mailing list