user32/tests: Fix some tests that break in UTF-8 codepage.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2022-04-14 11:34:21 +02:00
parent dee9a361c7
commit 86b063c1a9
2 changed files with 6 additions and 6 deletions

View File

@ -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;

View File

@ -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;