mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-28 02:20:04 +01:00
Bug 655076 - Our normalization code misses some Full_Composition_Exclusion=True.
This commit is contained in:
parent
c404dbed11
commit
b30ca6e5a5
@ -1109,6 +1109,10 @@ sub output_composition_table
|
||||
@values = map { hex ($_) } split /\s+/, $compositions{$code};
|
||||
|
||||
# non-starters
|
||||
if ($cclass[$code]) {
|
||||
delete $compositions{$code};
|
||||
next;
|
||||
}
|
||||
if ($cclass[$values[0]]) {
|
||||
delete $compositions{$code};
|
||||
next;
|
||||
|
@ -432,6 +432,10 @@ test_compose (void)
|
||||
g_assert (!g_unichar_compose (0x0041, 0, &ch) && ch == 0);
|
||||
g_assert (!g_unichar_compose (0x0066, 0x0069, &ch) && ch == 0);
|
||||
|
||||
/* Tricky non-composable */
|
||||
g_assert (!g_unichar_compose (0x0308, 0x0301, &ch) && ch == 0); /* !0x0344 */
|
||||
g_assert (!g_unichar_compose (0x0F71, 0x0F72, &ch) && ch == 0); /* !0x0F73 */
|
||||
|
||||
/* Singletons should not compose */
|
||||
g_assert (!g_unichar_compose (0x212B, 0, &ch) && ch == 0);
|
||||
g_assert (!g_unichar_compose (0x00C5, 0, &ch) && ch == 0);
|
||||
@ -466,6 +470,10 @@ test_decompose (void)
|
||||
g_assert (g_unichar_decompose (0x212B, &a, &b) && a == 0x00C5 && b == 0);
|
||||
g_assert (g_unichar_decompose (0x2126, &a, &b) && a == 0x03A9 && b == 0);
|
||||
|
||||
/* Tricky pairs */
|
||||
g_assert (g_unichar_decompose (0x0344, &a, &b) && a == 0x0308 && b == 0x0301);
|
||||
g_assert (g_unichar_decompose (0x0F73, &a, &b) && a == 0x0F71 && b == 0x0F72);
|
||||
|
||||
/* Pairs */
|
||||
g_assert (g_unichar_decompose (0x00C5, &a, &b) && a == 0x0041 && b == 0x030A);
|
||||
g_assert (g_unichar_decompose (0x00F4, &a, &b) && a == 0x006F && b == 0x0302);
|
||||
@ -509,6 +517,10 @@ test_fully_decompose_canonical (void)
|
||||
TEST2 (0x212B, 0x0041, 0x030A);
|
||||
TEST1 (0x2126, 0x03A9);
|
||||
|
||||
/* Tricky pairs */
|
||||
TEST2 (0x0344, 0x0308, 0x0301);
|
||||
TEST2 (0x0F73, 0x0F71, 0x0F72);
|
||||
|
||||
/* General */
|
||||
TEST2 (0x00C5, 0x0041, 0x030A);
|
||||
TEST2 (0x00F4, 0x006F, 0x0302);
|
||||
@ -555,6 +567,10 @@ test_canonical_decomposition (void)
|
||||
TEST2 (0x212B, 0x0041, 0x030A);
|
||||
TEST1 (0x2126, 0x03A9);
|
||||
|
||||
/* Tricky pairs */
|
||||
TEST2 (0x0344, 0x0308, 0x0301);
|
||||
TEST2 (0x0F73, 0x0F71, 0x0F72);
|
||||
|
||||
/* General */
|
||||
TEST2 (0x00C5, 0x0041, 0x030A);
|
||||
TEST2 (0x00F4, 0x006F, 0x0302);
|
||||
|
Loading…
x
Reference in New Issue
Block a user