# HG changeset patch
# User Tina Müller <cpan2@tinita.de>
# Date 1589719437 -7200
#      Sun May 17 14:43:57 2020 +0200
# Node ID c2c0149f86820448c7c1701bf86509b37099fc15
# Parent  36fdfc6308c68d9c9861decb3032227a9097978c
Output error position in run-parser-test-suite.c

diff --git a/tests/run-parser-test-suite.c b/tests/run-parser-test-suite.c
--- a/tests/run-parser-test-suite.c
+++ b/tests/run-parser-test-suite.c
@@ -30,7 +30,15 @@
     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;