From: Mike FABIAN Date: Tue, 8 Aug 2023 15:52:09 +0000 (+0200) Subject: Add test case for single char compose sequence X-Git-Tag: archive/raspbian/4.12.4+ds-3+rpi1^2~21^2~2^2~34 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f495f9cf7df635123790f895a17f845a45f1ddd1;p=gtk4.git Add test case for single char compose sequence --- diff --git a/testsuite/gtk/compose/match b/testsuite/gtk/compose/match index 1cb4e74cf5..780a26af47 100644 --- a/testsuite/gtk/compose/match +++ b/testsuite/gtk/compose/match @@ -2,3 +2,4 @@ : "?" : "🥂" : "this is a long replacement string" + : "qq" diff --git a/testsuite/gtk/composetable.c b/testsuite/gtk/composetable.c index 0ee3bac1fb..85a27b0fa7 100644 --- a/testsuite/gtk/composetable.c +++ b/testsuite/gtk/composetable.c @@ -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); }