diff -r 9fb13a5dde3b -r 783eff3047bc test/harness/testcase.c --- a/test/harness/testcase.c Mon Sep 23 21:18:27 2013 +0100 +++ b/test/harness/testcase.c Sat Oct 05 21:37:31 2013 +0100 @@ -527,6 +527,31 @@ } /* + * Run a testcase, returning FALSE on error. + * Bookloupe's output or a suitable error message will be shown. + */ +gboolean testcase_show_output(Testcase *testcase) +{ + gboolean r; + gchar *output; + GError *error=NULL; + r=testcase_create_input_files(testcase,&error); + if (r) + { + r&=testcase_spawn_bookloupe(testcase,&output,&error); + r&=testcase_remove_input_files(testcase,&error); + } + if (r) + g_print("%s",output); + else + { + g_print("%s\n",error->message); + g_error_free(error); + } + return r; +} + +/* * Free a testcase warning. */ void testcase_warning_free(TestcaseWarning *warning)