summaryrefslogtreecommitdiff
path: root/tests/test-break.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-break.c')
-rw-r--r--tests/test-break.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/tests/test-break.c b/tests/test-break.c
index aec36008..df9b78e2 100644
--- a/tests/test-break.c
+++ b/tests/test-break.c
@@ -70,6 +70,14 @@ test_file (const gchar *filename, GString *string)
layout = pango_layout_new (context);
pango_layout_set_text (layout, text, length);
pango_layout_set_attributes (layout, attributes);
+
+ if (pango_layout_get_unknown_glyphs_count (layout) > 0)
+ {
+ char *msg = g_strdup_printf ("Missing glyphs - skipping %s. Maybe fonts are missing?", filename);
+ g_test_skip (msg);
+ g_free (msg);
+ }
+
pango_layout_get_log_attrs (layout, &attrs, &len);
s1 = g_string_new ("Breaks: ");
@@ -251,9 +259,6 @@ test_break (gconstpointer d)
return;
}
- if (context == NULL)
- context = pango_font_map_create_context (pango_cairo_font_map_get_default ());
-
expected_file = get_expected_filename (filename);
dump = g_string_sized_new (0);
@@ -296,6 +301,10 @@ main (int argc, char *argv[])
g_test_init (&argc, &argv, NULL);
+ setlocale (LC_ALL, "");
+
+ context = pango_font_map_create_context (pango_cairo_font_map_get_default ());
+
/* allow to easily generate expected output for new test cases */
if (argc > 1)
{