[pango] Add some emoji break test cases
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango] Add some emoji break test cases
- Date: Mon, 31 Jul 2017 17:52:50 +0000 (UTC)
commit 872fa3db34e6aacb898b7018276a941f8312811a
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Jul 31 18:04:52 2017 +0100
Add some emoji break test cases
These are the same testcases from the previous commit.
tests/EmojiBreakTest.txt | 3 +++
tests/testboundaries_ucd.c | 17 +++++++++++++++++
2 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/tests/EmojiBreakTest.txt b/tests/EmojiBreakTest.txt
new file mode 100644
index 0000000..d41b647
--- /dev/null
+++ b/tests/EmojiBreakTest.txt
@@ -0,0 +1,3 @@
+÷ 1F3CC × FE0F × 200D ÷ 2642 × FE0F ÷
+÷ 1F3CC × 200D ÷ 2642 ÷
+# Lines: 2
diff --git a/tests/testboundaries_ucd.c b/tests/testboundaries_ucd.c
index 5a78406..a398287 100644
--- a/tests/testboundaries_ucd.c
+++ b/tests/testboundaries_ucd.c
@@ -343,6 +343,22 @@ test_grapheme_break (void)
}
static void
+test_emoji_break (void)
+{
+ const gchar *filename;
+ AttrBits bits;
+
+#if GLIB_CHECK_VERSION(2, 37, 2)
+ filename = g_test_get_filename (G_TEST_DIST, "EmojiBreakTest.txt", NULL);
+#else
+ filename = SRCDIR "/EmojiBreakTest.txt";
+#endif
+ bits.bits = 0;
+ bits.attr.is_cursor_position = 1;
+ do_test (filename, bits, FALSE);
+}
+
+static void
test_word_break (void)
{
const gchar *filename;
@@ -404,6 +420,7 @@ main (gint argc,
g_test_add_func ("/text/break/word", test_word_break);
g_test_add_func ("/text/break/sentence", test_sentence_break);
g_test_add_func ("/text/break/line", test_line_break);
+ g_test_add_func ("/text/break/emoji", test_emoji_break);
return g_test_run ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]