summaryrefslogtreecommitdiff
path: root/glib/gtestutils.c
diff options
context:
space:
mode:
Diffstat (limited to 'glib/gtestutils.c')
-rw-r--r--glib/gtestutils.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/glib/gtestutils.c b/glib/gtestutils.c
index d24c6e186..dc153d1af 100644
--- a/glib/gtestutils.c
+++ b/glib/gtestutils.c
@@ -1072,7 +1072,20 @@ g_test_log (GTestLogType lbit,
break;
case G_TEST_LOG_MESSAGE:
if (test_tap_log)
- g_print ("# %s\n", string1);
+ {
+ if (strstr (string1, "\n") == NULL)
+ g_print ("# %s\n", string1);
+ else
+ {
+ char **lines = g_strsplit (string1, "\n", -1);
+ guint n_lines = g_strv_length (lines);
+
+ for (guint i = 0; i < n_lines; i++)
+ g_print ("# %s\n", lines[i]);
+
+ g_strfreev (lines);
+ }
+ }
else if (g_test_verbose ())
g_print ("(MSG: %s)\n", string1);
break;