summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-01-21 19:51:02 +0000
committerMatthias Clasen <mclasen@redhat.com>2021-01-21 19:51:02 +0000
commit30748213af2bdc373aab076927a7c73ec314b776 (patch)
tree12e56ca20c02de9ab40a3dc39163b1f5016f1127 /tests
parent59074f13f87f09f493b0534da302f915a3f67a8f (diff)
parent0a816b491b3eac8ca7d285857bd57efa3658d7ae (diff)
downloadpango-30748213af2bdc373aab076927a7c73ec314b776.tar.gz
Merge branch 'fix' into 'master'
Fix the length checking Closes #526 See merge request GNOME/pango!273
Diffstat (limited to 'tests')
-rw-r--r--tests/testmisc.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/testmisc.c b/tests/testmisc.c
index 2f6c148b..48f60ee9 100644
--- a/tests/testmisc.c
+++ b/tests/testmisc.c
@@ -54,6 +54,19 @@ test_itemize_empty_crash (void)
g_object_unref (context);
}
+static void
+test_itemize_utf8 (void)
+{
+ PangoContext *context;
+ GList *result = NULL;
+
+ context = pango_font_map_create_context (pango_cairo_font_map_get_default ());
+ result = pango_itemize_with_base_dir (context, PANGO_DIRECTION_LTR, "\xc3\xa1\na", 3, 1, NULL, NULL);
+ g_assert (result != NULL);
+
+ g_object_unref (context);
+}
+
/* Test that pango_layout_set_text (layout, "short", 200)
* does not lead to a crash. (pidgin does this)
*/
@@ -94,6 +107,7 @@ main (int argc, char *argv[])
g_test_add_func ("/layout/shape-tab-crash", test_shape_tab_crash);
g_test_add_func ("/layout/itemize-empty-crash", test_itemize_empty_crash);
+ g_test_add_func ("/layout/itemize-utf8", test_itemize_utf8);
g_test_add_func ("/layout/short-string-crash", test_short_string_crash);
g_test_add_func ("/language/emoji-crash", test_language_emoji_crash);