summaryrefslogtreecommitdiff
path: root/tests/testing-util
diff options
context:
space:
mode:
authorGarrett Regier <garrettregier@gmail.com>2014-06-24 10:49:07 -0700
committerGarrett Regier <garrettregier@gmail.com>2014-06-28 05:52:02 -0700
commit977aaa4f70e265f0b50d33a89949a2f5fbbe9062 (patch)
tree07f3727247884658966ec7cd16ece9d528fd5b2a /tests/testing-util
parent6b0c65f7598cfd178bf53d5cd4e9f08458de84dc (diff)
downloadlibpeas-977aaa4f70e265f0b50d33a89949a2f5fbbe9062.tar.gz
Fix error message when popping log hooks fails
Diffstat (limited to 'tests/testing-util')
-rw-r--r--tests/testing-util/testing-util.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/testing-util/testing-util.c b/tests/testing-util/testing-util.c
index 8b843a3..d31a8cb 100644
--- a/tests/testing-util/testing-util.c
+++ b/tests/testing-util/testing-util.c
@@ -281,17 +281,19 @@ testing_util_pop_log_hooks (void)
}
else if (unhit_hooks->len > 1)
{
- /* Use the default log handler directly to avoid recurse complaints */
- g_log_default_handler (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR,
- "Log hooks were not triggered:\n", NULL);
+ GString *msg;
+
+ msg = g_string_new ("Log hooks were not triggered:");
for (i = 0; i < unhit_hooks->len; ++i)
{
hook = g_ptr_array_index (unhit_hooks, i);
- g_print ("\t'%s'\n", hook->pattern);
+ g_string_append_printf (msg, "\n\t'%s'", hook->pattern);
}
+ /* Use the default log handler directly to avoid recurse complaints */
+ g_log_default_handler (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, msg->str, NULL);
abort ();
}