Module: wine Branch: master Commit: e574350b62b7859665454a553a5e5add6d100578 URL: http://source.winehq.org/git/wine.git/?a=commit;h=e574350b62b7859665454a553a...
Author: Huw Davies huw@codeweavers.com Date: Sun Nov 13 14:29:56 2016 -0600
user32/tests: Don't perform character lookup ToUnicode() tests on non-US keyboards.
Signed-off-by: Huw Davies huw@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/user32/tests/input.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c index 8e89481..6684089 100644 --- a/dlls/user32/tests/input.c +++ b/dlls/user32/tests/input.c @@ -1648,6 +1648,8 @@ static void test_ToUnicode(void) const BYTE SC_RETURN = 0x1c, SC_TAB = 0x0f, SC_A = 0x1e; const BYTE HIGHEST_BIT = 0x80; int i, ret; + BOOL us_kbd = (GetKeyboardLayout(0) == (HKL)(ULONG_PTR)0x04090409); + for(i=0; i<256; i++) state[i]=0;
@@ -1674,7 +1676,10 @@ static void test_ToUnicode(void)
if(!vk) { - short vk_ret = VkKeyScanW(utests[i].chr); + short vk_ret; + + if (!us_kbd) continue; + vk_ret = VkKeyScanW(utests[i].chr); if (vk_ret == -1) continue; vk = vk_ret & 0xff; if (vk_ret & 0x100) mod |= shift;