Add test case for single char compose sequence
authorMike FABIAN <mfabian@redhat.com>
Tue, 8 Aug 2023 15:52:09 +0000 (17:52 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 19 Sep 2023 19:19:27 +0000 (15:19 -0400)
testsuite/gtk/compose/match
testsuite/gtk/composetable.c

index 1cb4e74cf5cd41896f5a7e40b4ba7b4d982f91c1..780a26af47ae3f21d189114f974d8d01baaed97b 100644 (file)
@@ -2,3 +2,4 @@
 <Multi_key> <s> <e> <q> <u> : "?"
 <Multi_key> <z> <w> <i> <n> <e> <s> : "🥂"
 <Multi_key> <l> <o> <n> <g> : "this is a long replacement string"
+<q> : "qq"
index 0ee3bac1fb77ca1024db5cb894722e55035fe6a6..85a27b0fa7b09413a747c418dfabf0a9101f49bd 100644 (file)
@@ -242,6 +242,16 @@ compose_table_match (void)
   g_assert_true (match);
   g_assert_cmpstr (output->str, ==, "this is a long replacement string");
 
+  g_string_set_size (output, 0);
+
+  buffer[0] = GDK_KEY_q;
+  buffer[1] = 0;
+  ret = gtk_compose_table_check (table, buffer, 1, &finish, &match, output);
+  g_assert_true (ret);
+  g_assert_false (finish);
+  g_assert_true (match);
+  g_assert_cmpstr (output->str, ==, "qq");
+
   g_string_free (output, TRUE);
   g_free (file);
 }