summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-11-28 21:52:47 -0500
committerMatthias Clasen <mclasen@redhat.com>2021-11-29 08:12:11 -0500
commit7a96294c33cc6f2a6e34b7f4f9d57c93754eff0c (patch)
tree7667851832cf7aa32cb79849c94b44e84640f79e
parent2ebc3d7501d5c60d6a01851dea348d13bf99b69c (diff)
downloadpango-7a96294c33cc6f2a6e34b7f4f9d57c93754eff0c.tar.gz
test-layout: Make --fonts work as expected
We want to use this without initializing tests.
-rw-r--r--tests/test-layout.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/test-layout.c b/tests/test-layout.c
index 3ea3063d..1139e4fd 100644
--- a/tests/test-layout.c
+++ b/tests/test-layout.c
@@ -117,7 +117,7 @@ install_fonts (const char *dir)
config = FcConfigCreate ();
- path = g_test_build_filename (G_TEST_DIST, "fonts/fonts.conf", NULL);
+ path = g_build_filename (dir, "fonts.conf", NULL);
g_file_get_contents (path, &conf, &len, NULL);
if (!FcConfigParseAndLoadFromMemory (config, (const FcChar8 *) conf, TRUE))
@@ -161,7 +161,10 @@ main (int argc, char *argv[])
g_option_context_free (option_context);
if (opt_fonts)
- install_fonts (opt_fonts);
+ {
+ install_fonts (opt_fonts);
+ g_free (opt_fonts);
+ }
/* allow to easily generate expected output for new test cases */
if (argc > 1 && argv[1][0] != '-')