summaryrefslogtreecommitdiff
path: root/tests/test-layout.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-layout.c')
-rw-r--r--tests/test-layout.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test-layout.c b/tests/test-layout.c
index 58ab46eb..5362d6fc 100644
--- a/tests/test-layout.c
+++ b/tests/test-layout.c
@@ -238,6 +238,9 @@ test_file (const gchar *filename, GString *string)
PangoWrapMode wrap = PANGO_WRAP_WORD;
PangoFontDescription *desc;
+ if (context == NULL)
+ context = pango_font_map_create_context (pango_cairo_font_map_get_default ());
+
g_file_get_contents (filename, &contents, &length, &error);
g_assert_no_error (error);
@@ -344,9 +347,9 @@ test_layout (gconstpointer d)
g_test_fail ();
g_strfreev (lines);
- g_free (diff);
}
+ g_free (diff);
g_string_free (dump, TRUE);
g_free (expected_file);
}