[glib/nonchar-testcase] Add a Unicode testcase




commit 240675d5f4309deb6f3aa350d992bba8f3b4e0b6
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed May 18 19:24:04 2022 -0400

    Add a Unicode testcase
    
    This verifies that GString is not to blame for the bug
    in https://github.com/harfbuzz/harfbuzz/issues/3590

 glib/tests/string.c | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/glib/tests/string.c b/glib/tests/string.c
index 0229099e79..7d76f312f6 100644
--- a/glib/tests/string.c
+++ b/glib/tests/string.c
@@ -376,6 +376,11 @@ test_string_insert_unichar (void)
   g_string_insert_unichar (string, -1, 0x1D100);
   g_assert_cmpstr (string->str, ==, "start\xF0\x9D\x84\x80");
   g_string_free (string, TRUE);
+
+  string = g_string_new ("start");
+  g_string_insert_unichar (string, -1, 0xFFD0);
+  g_assert_cmpstr (string->str, ==, "start\xEF\xBF\x90");
+  g_string_free (string, TRUE);
 }
 
 static void


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