mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-15 00:36:19 +01:00
Merge branch 'ebassi/test-tap-lines' into 'master'
Split g_test_log() messages that contain multiple lines See merge request GNOME/glib!2026
This commit is contained in:
commit
0ab4ed5306
@ -1072,7 +1072,20 @@ g_test_log (GTestLogType lbit,
|
|||||||
break;
|
break;
|
||||||
case G_TEST_LOG_MESSAGE:
|
case G_TEST_LOG_MESSAGE:
|
||||||
if (test_tap_log)
|
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);
|
||||||
|
gsize i;
|
||||||
|
|
||||||
|
for (i = 0; lines[i] != NULL; i++)
|
||||||
|
g_print ("# %s\n", lines[i]);
|
||||||
|
|
||||||
|
g_strfreev (lines);
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (g_test_verbose ())
|
else if (g_test_verbose ())
|
||||||
g_print ("(MSG: %s)\n", string1);
|
g_print ("(MSG: %s)\n", string1);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user