From: André Hentschel Subject: gdi32/tests: Mark Win8.1 behaviour for johab charset as broken Message-Id: <53238DAA.3050105@dawncrow.de> Date: Sat, 15 Mar 2014 00:15:54 +0100 https://bugs.winehq.org/show_bug.cgi?id=35575 --- dlls/gdi32/tests/font.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index a9d2fb0..fcb03a9 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -1181,20 +1181,21 @@ static void test_GetCharABCWidths(void) UINT cs; UINT a; UINT w; + BOOL broken; BOOL r[sizeof range / sizeof range[0]]; } c[] = { - {ANSI_CHARSET, 0x30, 0x30, + {ANSI_CHARSET, 0x30, 0x30, FALSE, {TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE}}, - {SHIFTJIS_CHARSET, 0x82a0, 0x3042, + {SHIFTJIS_CHARSET, 0x82a0, 0x3042, FALSE, {TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE}}, - {HANGEUL_CHARSET, 0x8141, 0xac02, + {HANGEUL_CHARSET, 0x8141, 0xac02, FALSE, {TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE}}, - {JOHAB_CHARSET, 0x8446, 0x3135, + {JOHAB_CHARSET, 0x8446, 0x3135, TRUE /* Win8.1 */, {TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE}}, - {GB2312_CHARSET, 0x8141, 0x4e04, + {GB2312_CHARSET, 0x8141, 0x4e04, FALSE, {TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE}}, - {CHINESEBIG5_CHARSET, 0xa142, 0x3001, + {CHINESEBIG5_CHARSET, 0xa142, 0x3001, FALSE, {TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE}} }; UINT i; @@ -1264,9 +1265,9 @@ static void test_GetCharABCWidths(void) memset(a, 0, sizeof a); memset(w, 0, sizeof w); hfont = SelectObject(hdc, hfont); - ok(pGetCharABCWidthsA(hdc, c[i].a, c[i].a + 1, a) && - pGetCharABCWidthsW(hdc, c[i].w, c[i].w + 1, w) && - memcmp(a, w, sizeof a) == 0, + ok((pGetCharABCWidthsA(hdc, c[i].a, c[i].a + 1, a) && + pGetCharABCWidthsW(hdc, c[i].w, c[i].w + 1, w) && + memcmp(a, w, sizeof a) == 0) || broken(c[i].broken), "GetCharABCWidthsA and GetCharABCWidthsW should return same widths. charset = %u\n", c[i].cs); memset(a, 0xbb, sizeof a); @@ -1282,13 +1283,13 @@ static void test_GetCharABCWidths(void) { memset(full, 0xdd, sizeof full); ret = pGetCharABCWidthsA(hdc, range[j].first, range[j].last, full); - ok(ret == c[i].r[j], "GetCharABCWidthsA %x - %x should have %s\n", + ok(ret == c[i].r[j] || broken(c[i].broken), "GetCharABCWidthsA %x - %x should have %s\n", range[j].first, range[j].last, c[i].r[j] ? "succeeded" : "failed"); if (ret) { UINT last = range[j].last - range[j].first; ret = pGetCharABCWidthsA(hdc, range[j].last, range[j].last, a); - ok(ret && memcmp(&full[last], &a[0], sizeof(ABC)) == 0, + ok((ret && memcmp(&full[last], &a[0], sizeof(ABC)) == 0) || broken(c[i].broken), "GetCharABCWidthsA %x should match. codepage = %u\n", range[j].last, c[i].cs); } -- 1.8.1.2