diff -r 6a13fe0fc19e -r 4a80c6053a66 test/harness/testcase.c --- a/test/harness/testcase.c Mon Jan 30 00:36:31 2012 +0000 +++ b/test/harness/testcase.c Mon Jan 30 23:32:47 2012 +0000 @@ -62,7 +62,7 @@ else if (!g_unichar_iszerowidth(c)) col++; } - fprintf(stderr,"%s\n%*s^\n",string->str,col,""); + g_print("%s\n%*s^\n",string->str,col,""); g_string_free(string,TRUE); } @@ -252,8 +252,8 @@ GError *error=NULL; if (!testcase_create_input_files(testcase,&error)) { - fprintf(stderr,"%s: FAIL\n",testcase->basename); - fprintf(stderr,"%s\n",error->message); + g_print("%s: FAIL\n",testcase->basename); + g_print("%s\n",error->message); g_error_free(error); return FALSE; } @@ -266,8 +266,8 @@ } if (!r) { - fprintf(stderr,"%s: FAIL\n",testcase->basename); - fprintf(stderr,"%s\n",error->message); + g_print("%s: FAIL\n",testcase->basename); + g_print("%s\n",error->message); g_error_free(error); (void)testcase_remove_input_files(testcase,NULL); return FALSE; @@ -275,8 +275,8 @@ filename=testcase_resolve_input_files(testcase,"TEST-XXXXXX"); if (!testcase_remove_input_files(testcase,&error)) { - fprintf(stderr,"%s: FAIL\n",testcase->basename); - fprintf(stderr,"%s\n",error->message); + g_print("%s: FAIL\n",testcase->basename); + g_print("%s\n",error->message); g_error_free(error); return FALSE; } @@ -288,9 +288,9 @@ expected=g_string_new(testcase->expected); if (!g_str_has_prefix(output,header->str)) { - fprintf(stderr,"%s: FAIL\n",testcase->basename); + g_print("%s: FAIL\n",testcase->basename); offset=common_prefix_length(output,header->str); - fprintf(stderr,"Unexpected header from bookloupe:\n"); + g_print("Unexpected header from bookloupe:\n"); print_unexpected(output,offset); r=FALSE; } @@ -303,22 +303,22 @@ pos=s-output+2; else { - fprintf(stderr,"%s: FAIL\n",testcase->basename); + g_print("%s: FAIL\n",testcase->basename); offset=common_prefix_length(output,header->str); - fprintf(stderr,"Unterminated summary from bookloupe:\n%s\n", + g_print("Unterminated summary from bookloupe:\n%s\n", output+pos); r=FALSE; } } if (r && strcmp(output+pos,expected->str)) { - fprintf(stderr,"%s: FAIL\n",testcase->basename); + g_print("%s: FAIL\n",testcase->basename); offset=common_prefix_length(output+pos,expected->str); if (!offset && !output[pos+offset]) - fprintf(stderr,"Unexpected zero warnings from bookloupe.\n"); + g_print("Unexpected zero warnings from bookloupe.\n"); else { - fprintf(stderr,"Unexpected output from bookloupe:\n"); + g_print("Unexpected output from bookloupe:\n"); print_unexpected(output+pos,offset); } r=FALSE; @@ -329,7 +329,7 @@ g_free(filename); g_free(output); if (r) - fprintf(stderr,"%s: PASS\n",testcase->basename); + g_print("%s: PASS\n",testcase->basename); return r; }