diff options
author | Matthias Clasen <mclasen@redhat.com> | 2017-07-31 18:04:52 +0100 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2017-07-31 18:04:52 +0100 |
commit | 872fa3db34e6aacb898b7018276a941f8312811a (patch) | |
tree | 6f1f21cc25fb9a1fdd2b25a8c9daa4c1a40710fd /tests/testboundaries_ucd.c | |
parent | 5a8c7b22fe7f3eb6b980e9cd9e569694f59edb41 (diff) | |
download | pango-872fa3db34e6aacb898b7018276a941f8312811a.tar.gz |
Add some emoji break test cases
These are the same testcases from the previous commit.
Diffstat (limited to 'tests/testboundaries_ucd.c')
-rw-r--r-- | tests/testboundaries_ucd.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/testboundaries_ucd.c b/tests/testboundaries_ucd.c index 5a78406f..a398287a 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 (); } |