From 7a96294c33cc6f2a6e34b7f4f9d57c93754eff0c Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 28 Nov 2021 21:52:47 -0500 Subject: test-layout: Make --fonts work as expected We want to use this without initializing tests. --- tests/test-layout.c | 7 +++++-- 1 file 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] != '-') -- cgit v1.2.1