[gtk/double-dead-keys: 3/3] Add some more compose tests




commit 01f4e5c8cd01927855a25df86230c81e2341bfaf
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Mar 26 20:14:24 2021 -0400

    Add some more compose tests
    
    These tests changes to the algorithmic dead key
    matching.

 testsuite/gtk/composetable.c | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
---
diff --git a/testsuite/gtk/composetable.c b/testsuite/gtk/composetable.c
index b41faf08f2..da28cda6d1 100644
--- a/testsuite/gtk/composetable.c
+++ b/testsuite/gtk/composetable.c
@@ -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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]