Module: wine Branch: master Commit: 86b063c1a912beea24aeafdd94c5d4a8d2c68271 URL: https://source.winehq.org/git/wine.git/?a=commit;h=86b063c1a912beea24aeafdd9...
Author: Alexandre Julliard julliard@winehq.org Date: Thu Apr 14 11:34:21 2022 +0200
user32/tests: Fix some tests that break in UTF-8 codepage.
Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/user32/tests/resource.c | 8 ++++---- dlls/user32/tests/wsprintf.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/user32/tests/resource.c b/dlls/user32/tests/resource.c index 97c274c7817..fff962b955c 100644 --- a/dlls/user32/tests/resource.c +++ b/dlls/user32/tests/resource.c @@ -172,11 +172,11 @@ static void test_accel1(void) ac[n++].fVirt = (SHORT) 0xffff;
ac[n].cmd = 0xfff0; - ac[n].key = 0xffff; + ac[n].key = 'B'; ac[n++].fVirt = (SHORT) 0xfff0;
ac[n].cmd = 0xfff0; - ac[n].key = 0xffff; + ac[n].key = 'C'; ac[n++].fVirt = 0x0000;
ac[n].cmd = 0xfff0; @@ -204,12 +204,12 @@ static void test_accel1(void)
if (++n == r) goto done; ok( ac[n].cmd == 0xfff0, "cmd 2 not preserved got %x\n", ac[n].cmd); - ok( (ac[n].key & 0xff) == 0xff, "key 2 not preserved got %x\n", ac[n].key); + ok( ac[n].key == 'B', "key 2 not preserved got %x\n", ac[n].key); ok( ac[n].fVirt == 0x0070, "fVirt 2 wrong got %x\n", ac[n].fVirt);
if (++n == r) goto done; ok( ac[n].cmd == 0xfff0, "cmd 3 not preserved got %x\n", ac[n].cmd); - ok( (ac[n].key & 0xff) == 0xff, "key 3 not preserved got %x\n", ac[n].key); + ok( ac[n].key == 'C', "key 3 not preserved got %x\n", ac[n].key); ok( ac[n].fVirt == 0x0000, "fVirt 3 wrong got %x\n", ac[n].fVirt);
if (++n == r) goto done; diff --git a/dlls/user32/tests/wsprintf.c b/dlls/user32/tests/wsprintf.c index f46cfa5aea3..d35138f4087 100644 --- a/dlls/user32/tests/wsprintf.c +++ b/dlls/user32/tests/wsprintf.c @@ -95,7 +95,7 @@ static void wsprintfATest(void) ok(!strcmp(buf, i64_formats[i].res), "%u: wrong result [%s]\n", i, buf); }
- if (!GetCPInfo(CP_ACP, &cpinfo) || cpinfo.MaxCharSize <= 1) + if (!GetCPInfo(CP_ACP, &cpinfo) || cpinfo.MaxCharSize != 2) { skip("Multi-byte wsprintfA test isn't available for the current codepage\n"); return; @@ -199,7 +199,7 @@ static void wsprintfWTest(void) ok(buf[0] == L' ', "expected \x0020, got \x%04x\n", buf[0]); ok(buf[1] == wc99, "expected \x%04x, got \x%04x\n", wc99, buf[1]);
- if (!GetCPInfoExW(CP_ACP, 0, &cpinfoex) || cpinfoex.MaxCharSize <= 1) + if (!GetCPInfoExW(CP_ACP, 0, &cpinfoex) || cpinfoex.MaxCharSize != 2) { skip("Multi-byte wsprintfW test isn't available for the current codepage\n"); return;