summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-09-12 13:35:50 -0400
committerMatthias Clasen <mclasen@redhat.com>2020-09-12 14:01:45 -0400
commita08172ea05b1ef3dbdfd3a35b66b802ee56a7473 (patch)
tree019f0cc85116ebae0d9f9ad2633d41325503cad1 /tests
parent93e6eb66d9615ceafc3f6528913657524f7e48d2 (diff)
downloadpango-a08172ea05b1ef3dbdfd3a35b66b802ee56a7473.tar.gz
tests: Make test-layout work standalone
This broke when I recently reshuffled things.
Diffstat (limited to 'tests')
-rw-r--r--tests/test-layout.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/test-layout.c b/tests/test-layout.c
index 58ab46eb..2cbdc042 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);