Add some more compose tests

These tests changes to the algorithmic dead key
matching.
This commit is contained in:
Matthias Clasen 2021-03-26 20:14:24 -04:00
parent 8a567d7932
commit 01f4e5c8cd

View File

@ -284,6 +284,34 @@ match_algorithmic (void)
ret = gtk_check_algorithmically (buffer, 3, &ch);
g_assert_true (ret);
g_assert_true (ch == 0x1f07);
buffer[0] = GDK_KEY_dead_acute;
buffer[1] = GDK_KEY_dead_cedilla;
buffer[2] = GDK_KEY_c;
ret = gtk_check_algorithmically (buffer, 2, &ch);
g_assert_true (ret);
g_assert_cmphex (ch, ==, 0);
ret = gtk_check_algorithmically (buffer, 3, &ch);
g_assert_true (ret);
g_assert_cmphex (ch, ==, 0x1e09);
buffer[0] = GDK_KEY_dead_cedilla;
buffer[1] = GDK_KEY_dead_acute;
buffer[2] = GDK_KEY_c;
ret = gtk_check_algorithmically (buffer, 3, &ch);
g_assert_true (ret);
g_assert_cmphex (ch, ==, 0x1e09);
ret = gtk_check_algorithmically (buffer, 2, &ch);
buffer[0] = GDK_KEY_dead_acute;
buffer[1] = GDK_KEY_dead_cedilla;
buffer[2] = GDK_KEY_dead_grave;
ret = gtk_check_algorithmically (buffer, 3, &ch);
g_assert_false (ret);
}
int