Rémi Bernon : user32/tests: Do not expect ToAscii with 'A' vkey to return 'a' on non-us keyboards.

Alexandre Julliard julliard at winehq.org
Wed Oct 23 15:31:32 CDT 2019


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

Author: Rémi Bernon <rbernon at codeweavers.com>
Date:   Wed Oct 23 12:34:09 2019 +0200

user32/tests: Do not expect ToAscii with 'A' vkey to return 'a' 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/input.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c
index 14399a6aac..130ce49bb5 100644
--- a/dlls/user32/tests/input.c
+++ b/dlls/user32/tests/input.c
@@ -1885,6 +1885,7 @@ static void test_ToAscii(void)
     const BYTE SC_RETURN = 0x1c, SC_A = 0x1e;
     const BYTE HIGHEST_BIT = 0x80;
     int ret;
+    BOOL us_kbd = (GetKeyboardLayout(0) == (HKL)(ULONG_PTR)0x04090409);
 
     memset(state, 0, sizeof(state));
 
@@ -1896,7 +1897,7 @@ static void test_ToAscii(void)
     character = 0;
     ret = ToAscii('A', SC_A, state, &character, 0);
     ok(ret == 1, "ToAscii for character 'A' didn't return 1 (was %i)\n", ret);
-    ok(character == 'a', "ToAscii for character 'A' was %i (expected %i)\n", character, 'a');
+    if (us_kbd) ok(character == 'a', "ToAscii for character 'A' was %i (expected %i)\n", character, 'a');
 
     state[VK_CONTROL] |= HIGHEST_BIT;
     state[VK_LCONTROL] |= HIGHEST_BIT;




More information about the wine-cvs mailing list