From e64189aa55f5d2c683163b3db85cd72026521772 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 7 Mar 2014 13:37:14 +0100 Subject: [PATCH] kernel32/tests: Add more Unicode digit ranges. --- dlls/kernel32/tests/locale.c | 46 +++++++++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 6 deletions(-) diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c index 62e9f0130d3..9abe53e9862 100644 --- a/dlls/kernel32/tests/locale.c +++ b/dlls/kernel32/tests/locale.c @@ -2320,6 +2320,7 @@ static void test_FoldStringW(void) 0x0030, /* '0'-'9' */ 0x0660, /* Eastern Arabic */ 0x06F0, /* Arabic - Hindu */ + 0x07C0, /* Nko */ 0x0966, /* Devengari */ 0x09E6, /* Bengalii */ 0x0A66, /* Gurmukhi */ @@ -2331,16 +2332,37 @@ static void test_FoldStringW(void) 0x0D66, /* Maylayalam */ 0x0E50, /* Thai */ 0x0ED0, /* Laos */ - 0x0F29, /* Tibet - 0 is out of sequence */ + 0x0F20, /* Tibet */ + 0x0F29, /* Tibet half - 0 is out of sequence */ + 0x1040, /* Myanmar */ + 0x1090, /* Myanmar Shan */ + 0x1368, /* Ethiopic - no 0 */ + 0x17E0, /* Khmer */ + 0x1810, /* Mongolian */ + 0x1946, /* Limbu */ + 0x19D0, /* New Tai Lue */ + 0x1A80, /* Tai Tham Hora */ + 0x1A90, /* Tai Tham Tham */ + 0x1B50, /* Balinese */ + 0x1BB0, /* Sundanese */ + 0x1C40, /* Lepcha */ + 0x1C50, /* Ol Chiki */ 0x2070, /* Superscript - 1, 2, 3 are out of sequence */ 0x2080, /* Subscript */ 0x245F, /* Circled - 0 is out of sequence */ 0x2473, /* Bracketed */ 0x2487, /* Full stop */ + 0x24F4, /* Double Circled */ 0x2775, /* Inverted circled - No 0 */ 0x277F, /* Patterned circled - No 0 */ 0x2789, /* Inverted Patterned circled - No 0 */ 0x3020, /* Hangzhou */ + 0xA620, /* Vai */ + 0xA8D0, /* Saurashtra */ + 0xA900, /* Kayah Li */ + 0xA9D0, /* Javanese */ + 0xAA50, /* Cham */ + 0xABF0, /* Meetei Mayek */ 0xff10, /* Pliene chasse (?) */ 0xffff /* Terminator */ }; @@ -2350,8 +2372,17 @@ static void test_FoldStringW(void) 0xB9, /* Superscript 1 */ 0xB2, /* Superscript 2 */ 0xB3, /* Superscript 3 */ + 0x0C78, /* Telugu Fraction 0 */ + 0x0C79, /* Telugu Fraction 1 */ + 0x0C7A, /* Telugu Fraction 2 */ + 0x0C7B, /* Telugu Fraction 3 */ + 0x0C7C, /* Telugu Fraction 1 */ + 0x0C7D, /* Telugu Fraction 2 */ + 0x0C7E, /* Telugu Fraction 3 */ 0x0F33, /* Tibetan half zero */ + 0x19DA, /* New Tai Lue Tham 1 */ 0x24EA, /* Circled 0 */ + 0x24FF, /* Negative Circled 0 */ 0x3007, /* Ideographic number zero */ '\0' /* Terminator */ }; @@ -2360,8 +2391,10 @@ static void test_FoldStringW(void) { 0x0BE6, /* No Tamil 0 */ 0x0F29, /* No Tibetan half zero (out of sequence) */ + 0x1368, /* No Ethiopic 0 */ 0x2473, /* No Bracketed 0 */ 0x2487, /* No 0 Full stop */ + 0x24F4, /* No double circled 0 */ 0x2775, /* No inverted circled 0 */ 0x277F, /* No patterned circled */ 0x2789, /* No inverted Patterned circled */ @@ -2489,10 +2522,11 @@ static void test_FoldStringW(void) ok(ret == 2, "Expected ret == 2, got %d, error %d\n", ret, GetLastError()); ok(dst[0] == ch || strchrW(outOfSequenceDigits, ch) || - /* Wine (correctly) maps all Unicode 4.0+ digits */ - isdigitW(ch) || (ch >= 0x24F5 && ch <= 0x24FD) || ch == 0x24FF || ch == 0x19da || - (ch >= 0x1369 && ch <= 0x1371), - "MAP_FOLDDIGITS: ch %d 0x%04x Expected unchanged got %d\n", ch, ch, dst[0]); + (ch >= 0xa8e0 && ch <= 0xa8e9), /* combining Devanagari on Win8 */ + "MAP_FOLDDIGITS: ch 0x%04x Expected unchanged got %04x\n", ch, dst[0]); + ok(!isdigitW(ch) || strchrW(outOfSequenceDigits, ch) || + broken( ch >= 0xbf0 && ch <= 0xbf2 ), /* win2k */ + "char %04x should not be a digit\n", ch ); } if (digitRanges[j] == 0xffff) @@ -2519,7 +2553,7 @@ static void test_FoldStringW(void) (digitRanges[j] == 0x3020 && dst[0] == ch) || /* Hangzhou not present in all Windows versions */ (digitRanges[j] == 0x0F29 && dst[0] == ch) || /* Tibetan not present in all Windows versions */ strchrW(noDigitAvailable, c), - "MAP_FOLDDIGITS: ch %d Expected %d got %d\n", + "MAP_FOLDDIGITS: ch %04x Expected %04x got %04x\n", ch, '0' + digitRanges[j] - ch, dst[0]); } prev_ch = ch;