test/harness/testcaseio.c
changeset 11 4a80c6053a66
parent 9 6a13fe0fc19e
child 17 2c88fd553e5d
     1.1 --- a/test/harness/testcaseio.c	Mon Jan 30 00:36:31 2012 +0000
     1.2 +++ b/test/harness/testcaseio.c	Mon Jan 30 23:32:47 2012 +0000
     1.3 @@ -9,7 +9,7 @@
     1.4  
     1.5  /*
     1.6   * Read a testcase in from a file.
     1.7 - * On error, print a suitable message on stderr and return NULL.
     1.8 + * On error, print a suitable message using g_printerr and return NULL.
     1.9   * The returned testcase should be freed with testcase_free().
    1.10   */
    1.11  Testcase *testcase_parse_file(const char *filename)
    1.12 @@ -25,7 +25,7 @@
    1.13  	return NULL;
    1.14      if (!*testcase_parser_get_flag(parser))
    1.15      {
    1.16 -	fprintf(stderr,"%s: Not a valid testcase (flag)\n",filename);
    1.17 +	g_printerr("%s: Not a valid testcase (flag)\n",filename);
    1.18  	testcase_parser_free(parser);
    1.19  	return NULL;
    1.20      }
    1.21 @@ -49,7 +49,7 @@
    1.22  		 * file on somebody's computer by getting them to run a
    1.23  		 * testcase!
    1.24  		 */
    1.25 -		fprintf(stderr,
    1.26 +		g_printerr(
    1.27  		  "%s: Input files may not have a directory component\n",arg);
    1.28  		g_free(s);
    1.29  		g_free(arg);
    1.30 @@ -76,7 +76,7 @@
    1.31  	}
    1.32  	else
    1.33  	{
    1.34 -	    fprintf(stderr,"%s: Not a valid testcase (%s)\n",filename,tag);
    1.35 +	    g_printerr("%s: Not a valid testcase (%s)\n",filename,tag);
    1.36  	    testcase_free(testcase);
    1.37  	    testcase_parser_free(parser);
    1.38  	    return NULL;
    1.39 @@ -86,10 +86,10 @@
    1.40      if (!testcase_parser_at_eof(parser))
    1.41      {
    1.42  	if (found_tag)
    1.43 -	    fprintf(stderr,"%s: Not a valid testcase (garbage at end)\n",
    1.44 +	    g_printerr("%s: Not a valid testcase (garbage at end)\n",
    1.45  	      filename);
    1.46  	else
    1.47 -	    fprintf(stderr,"%s: Not a valid testcase (no valid tags)\n",
    1.48 +	    g_printerr("%s: Not a valid testcase (no valid tags)\n",
    1.49  	      filename);
    1.50  	testcase_free(testcase);
    1.51  	testcase_parser_free(parser);