diff -r 4a80c6053a66 -r 2c88fd553e5d test/harness/testcaseio.c --- a/test/harness/testcaseio.c Mon Jan 30 23:32:47 2012 +0000 +++ b/test/harness/testcaseio.c Mon Feb 06 23:55:27 2012 +0000 @@ -6,6 +6,7 @@ #include "testcaseparser.h" #include "testcaseinput.h" #include "testcaseio.h" +#include "warningsparser.h" /* * Read a testcase in from a file. @@ -17,6 +18,8 @@ Testcase *testcase; TestcaseParser *parser; TestcaseInput *input=NULL; + GMarkupParseContext *context; + GError *err=NULL; char *s,*arg; const char *tag,*text; gboolean found_tag=FALSE; @@ -64,8 +67,25 @@ testcase->flags|=TESTCASE_TMP_DIR; g_free(arg); } - else if (!testcase->expected && !strcmp(tag,"EXPECTED")) + else if (!testcase->expected && !testcase->warnings && + !strcmp(tag,"EXPECTED")) testcase->expected=g_strdup(text); + else if (!testcase->expected && !testcase->warnings && + !strcmp(tag,"WARNINGS")) + { + context=warnings_parse_context_new(testcase); + if (!g_markup_parse_context_parse(context,text,-1,&err) || + !g_markup_parse_context_end_parse(context,&err)) + { + g_markup_parse_context_free(context); + g_printerr("%s\n",err->message); + g_clear_error(&err); + testcase_free(testcase); + testcase_parser_free(parser); + return NULL; + } + g_markup_parse_context_free(context); + } else if (!testcase->encoding && !strcmp(tag,"ENCODING")) testcase->encoding=g_strchomp(g_strdup(text)); else if (!testcase->encoding && !strcmp(tag,"OPTIONS"))