diff options
Diffstat (limited to 'tests/run-parser-test-suite.c')
-rw-r--r-- | tests/run-parser-test-suite.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/run-parser-test-suite.c b/tests/run-parser-test-suite.c index b2c7f84..776d379 100644 --- a/tests/run-parser-test-suite.c +++ b/tests/run-parser-test-suite.c @@ -30,7 +30,15 @@ int main(int argc, char *argv[]) while (1) { yaml_event_type_t type; if (!yaml_parser_parse(&parser, &event)) { - fprintf(stderr, "Parse error: %s\n", parser.problem); + if ( parser.problem_mark.line || parser.problem_mark.column ) { + fprintf(stderr, "Parse error: %s\nLine: %lu Column: %lu\n", + parser.problem, + (unsigned long)parser.problem_mark.line + 1, + (unsigned long)parser.problem_mark.column + 1); + } + else { + fprintf(stderr, "Parse error: %s\n", parser.problem); + } return 1; } type = event.type; |