Commit 4b5c67ee authored by Alexandre Julliard's avatar Alexandre Julliard

unicode: Remove case mappings that don't round-trip.

parent bd9d83b7
......@@ -6090,7 +6090,6 @@ static void test_SpecialCasing(void)
WCHAR exp; /* 0 if self */
WCHAR exp_ling; /* 0 if exp */
BOOL todo;
BOOL todo_ling;
} tests[] = {
{deDEW, LCMAP_UPPERCASE, 0x00DF}, /* LATIN SMALL LETTER SHARP S */
......@@ -6199,17 +6198,17 @@ static void test_SpecialCasing(void)
{enUSW, LCMAP_UPPERCASE, 'i', 'I'}, /* LATIN SMALL LETTER I */
{ltLTW, LCMAP_UPPERCASE, 'i', 'I'}, /* LATIN SMALL LETTER I */
{trTRW, LCMAP_UPPERCASE, 'i', 'I', 0x0130, FALSE, TRUE}, /* LATIN SMALL LETTER I */
{TRTRW, LCMAP_UPPERCASE, 'i', 'I', 0x0130, FALSE, TRUE}, /* LATIN SMALL LETTER I */
{azCyrlazW, LCMAP_UPPERCASE, 'i', 'I', 0x0130, FALSE, TRUE}, /* LATIN SMALL LETTER I */
{azLatnazW, LCMAP_UPPERCASE, 'i', 'I', 0x0130, FALSE, TRUE}, /* LATIN SMALL LETTER I */
{trTRW, LCMAP_UPPERCASE, 'i', 'I', 0x0130, TRUE}, /* LATIN SMALL LETTER I */
{TRTRW, LCMAP_UPPERCASE, 'i', 'I', 0x0130, TRUE}, /* LATIN SMALL LETTER I */
{azCyrlazW, LCMAP_UPPERCASE, 'i', 'I', 0x0130, TRUE}, /* LATIN SMALL LETTER I */
{azLatnazW, LCMAP_UPPERCASE, 'i', 'I', 0x0130, TRUE}, /* LATIN SMALL LETTER I */
{enUSW, LCMAP_LOWERCASE, 'I', 'i'}, /* LATIN CAPITAL LETTER I */
{ltLTW, LCMAP_LOWERCASE, 'I', 'i'}, /* LATIN CAPITAL LETTER I */
{trTRW, LCMAP_LOWERCASE, 'I', 'i', 0x0131, FALSE, TRUE}, /* LATIN CAPITAL LETTER I */
{TRTRW, LCMAP_LOWERCASE, 'I', 'i', 0x0131, FALSE, TRUE}, /* LATIN CAPITAL LETTER I */
{azCyrlazW, LCMAP_LOWERCASE, 'I', 'i', 0x0131, FALSE, TRUE}, /* LATIN CAPITAL LETTER I */
{azLatnazW, LCMAP_LOWERCASE, 'I', 'i', 0x0131, FALSE, TRUE}, /* LATIN CAPITAL LETTER I */
{trTRW, LCMAP_LOWERCASE, 'I', 'i', 0x0131, TRUE}, /* LATIN CAPITAL LETTER I */
{TRTRW, LCMAP_LOWERCASE, 'I', 'i', 0x0131, TRUE}, /* LATIN CAPITAL LETTER I */
{azCyrlazW, LCMAP_LOWERCASE, 'I', 'i', 0x0131, TRUE}, /* LATIN CAPITAL LETTER I */
{azLatnazW, LCMAP_LOWERCASE, 'I', 'i', 0x0131, TRUE}, /* LATIN CAPITAL LETTER I */
{enUSW, LCMAP_LOWERCASE, 0x0130,0,'i', TRUE}, /* LATIN CAPITAL LETTER I WITH DOT ABOVE */
{trTRW, LCMAP_LOWERCASE, 0x0130,0,'i', TRUE}, /* LATIN CAPITAL LETTER I WITH DOT ABOVE */
......@@ -6237,7 +6236,6 @@ static void test_SpecialCasing(void)
ok(ret == 1, "expected 1, got %d for %04x for %s\n", ret, tests[i].ch,
wine_dbgstr_w(tests[i].lang));
exp = tests[i].exp ? tests[i].exp : tests[i].ch;
todo_wine_if(tests[i].todo)
ok(buffer[0] == exp || broken(buffer[0] != exp),
"expected %04x, got %04x for %04x for %s\n",
exp, buffer[0], tests[i].ch, wine_dbgstr_w(tests[i].lang));
......@@ -6248,7 +6246,7 @@ static void test_SpecialCasing(void)
ok(ret == 1, "expected 1, got %d for %04x for %s\n", ret, tests[i].ch,
wine_dbgstr_w(tests[i].lang));
exp = tests[i].exp_ling ? tests[i].exp_ling : exp;
todo_wine_if(tests[i].todo_ling)
todo_wine_if(tests[i].todo)
ok(buffer[0] == exp || broken(buffer[0] != exp),
"expected %04x, got %04x for %04x for %s\n",
exp, buffer[0], tests[i].ch, wine_dbgstr_w(tests[i].lang));
......
......@@ -597,7 +597,6 @@ static void test_RtlUpcaseUnicodeChar(void)
} else {
expected_upper_ch = ch;
}
todo_wine_if(ch == 0xb5)
ok(upper_ch == expected_upper_ch,
"RtlUpcaseUnicodeChar('%c'[=0x%x]) has result '%c'[=0x%x], expected: '%c'[=0x%x]\n",
ch, ch, upper_ch, upper_ch, expected_upper_ch, expected_upper_ch);
......@@ -647,7 +646,6 @@ static void test_RtlUpcaseUnicodeString(void)
pRtlUpcaseUnicodeString(&result_str, &ascii_str, 0);
for (i = 0; i <= 255; i++) {
todo_wine_if(ascii_str.Buffer[i] == 0xb5)
ok(result_str.Buffer[i] == upper_str.Buffer[i],
"RtlUpcaseUnicodeString works wrong: '%c'[=0x%x] is converted to '%c'[=0x%x], expected: '%c'[=0x%x]\n",
ascii_str.Buffer[i], ascii_str.Buffer[i],
......
No preview for this file type
......@@ -622,6 +622,21 @@ sub READ_DEFAULTS($)
my $flag = $ctype{$cat};
foreach my $i (@{$special_categories{$cat}}) { $category_table[$i] |= $flag; }
}
# remove case mappings that don't round-trip
for (my $i = 0; $i < @toupper_table; $i++)
{
next unless defined $toupper_table[$i];
my $ch = $toupper_table[$i];
$toupper_table[$i] = undef unless defined $tolower_table[$ch] && $tolower_table[$ch] == $i;
}
for (my $i = 0; $i < @tolower_table; $i++)
{
next unless defined $tolower_table[$i];
my $ch = $tolower_table[$i];
$tolower_table[$i] = undef unless defined $toupper_table[$ch] && $toupper_table[$ch] == $i;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment