[pango/markup-parse-fixes: 1/5] markup tests: Make generating files more convenient




commit 4f2bc6426ad423e0635d632c5ada818ad73f87dd
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Mar 2 20:59:49 2021 -0500

    markup tests: Make generating files more convenient
    
    Don't print extraneous output when we are generating
    an .expected file with the markup-parse test.

 tests/markup-parse.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/tests/markup-parse.c b/tests/markup-parse.c
index 5f1454a1..50789821 100644
--- a/tests/markup-parse.c
+++ b/tests/markup-parse.c
@@ -139,8 +139,6 @@ 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)
     {
@@ -148,11 +146,13 @@ main (int argc, char *argv[])
 
       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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]