summaryrefslogtreecommitdiff
path: root/tests/markup-parse.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-03-02 20:59:49 -0500
committerMatthias Clasen <mclasen@redhat.com>2021-03-02 21:26:42 -0500
commit283f646dd7ac44d0c0d7b12d15bd2f6a4346c8f5 (patch)
treed5b9103b0e0790d50a5009ba83859dcd9534daca /tests/markup-parse.c
parent8d1ea2ae42ca22bf991a598c4ee975a051141938 (diff)
downloadpango-283f646dd7ac44d0c0d7b12d15bd2f6a4346c8f5.tar.gz
markup-parse: Make generating files more convenient
Don't print extraneous output when we are generating an .expected file.
Diffstat (limited to 'tests/markup-parse.c')
-rw-r--r--tests/markup-parse.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/markup-parse.c b/tests/markup-parse.c
index 2ee8c85e..9f081ab7 100644
--- a/tests/markup-parse.c
+++ b/tests/markup-parse.c
@@ -146,20 +146,20 @@ main (int argc, char *argv[])
g_setenv ("LC_ALL", "C", TRUE);
setlocale (LC_ALL, "");
- g_test_init (&argc, &argv, NULL);
-
/* allow to easily generate expected output for new test cases */
- if (argc > 1)
+ if (argc > 1 && argv[1][0] != '-')
{
GString *string;
string = g_string_sized_new (0);
test_file (argv[1], string);
- g_test_message ("%s", string->str);
+ g_print ("%s", string->str);
return 0;
}
+ g_test_init (&argc, &argv, NULL);
+
path = g_test_build_filename (G_TEST_DIST, "markups", NULL);
dir = g_dir_open (path, 0, &error);
g_free (path);