From e98567238d33fff4108702908a798404355b0036 Mon Sep 17 00:00:00 2001 From: Phillip Wood Date: Mon, 1 Dec 2025 14:21:57 +0000 Subject: [PATCH] tap: fix yaml delimiter The TAP 13 spec [1] states that the trailing delimiter for yaml diagnostics is "\s+...\n", not "\s+---\n". This causes prove to fail to parse the output of git's unit tests when they fail. NB If we ever want to change to using TAP 14 then we'll need to change the indentation as it requires a strict two space indentation. [1] https://testanything.org/tap-version-13-specification.html Reported-by: Jeff King --- clar/print.h | 2 +- test/expected/tap | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/clar/print.h b/clar/print.h index 89b6659..6a2321b 100644 --- a/clar/print.h +++ b/clar/print.h @@ -164,7 +164,7 @@ static void clar_print_tap_ontest(const char *suite_name, const char *test_name, printf(" file: '"); print_escaped(error->file); printf("'\n"); printf(" line: %" PRIuMAX "\n", error->line_number); printf(" function: '%s'\n", error->function); - printf(" ---\n"); + printf(" ...\n"); } break; diff --git a/test/expected/tap b/test/expected/tap index bddbd5d..06f9cee 100644 --- a/test/expected/tap +++ b/test/expected/tap @@ -8,7 +8,7 @@ not ok 1 - combined::1 file: 'file' line: 42 function: 'func' - --- + ... not ok 2 - combined::2 --- reason: | @@ -17,7 +17,7 @@ not ok 2 - combined::2 file: 'file' line: 42 function: 'func' - --- + ... not ok 3 - combined::strings --- reason: | @@ -27,7 +27,7 @@ not ok 3 - combined::strings file: 'file' line: 42 function: 'func' - --- + ... not ok 4 - combined::strings_with_length --- reason: | @@ -37,7 +37,7 @@ not ok 4 - combined::strings_with_length file: 'file' line: 42 function: 'func' - --- + ... not ok 5 - combined::int --- reason: | @@ -47,7 +47,7 @@ not ok 5 - combined::int file: 'file' line: 42 function: 'func' - --- + ... not ok 6 - combined::int_fmt --- reason: | @@ -57,7 +57,7 @@ not ok 6 - combined::int_fmt file: 'file' line: 42 function: 'func' - --- + ... not ok 7 - combined::bool --- reason: | @@ -67,7 +67,7 @@ not ok 7 - combined::bool file: 'file' line: 42 function: 'func' - --- + ... not ok 8 - combined::multiline_description --- reason: | @@ -78,7 +78,7 @@ not ok 8 - combined::multiline_description file: 'file' line: 42 function: 'func' - --- + ... not ok 9 - combined::null_string --- reason: | @@ -88,5 +88,5 @@ not ok 9 - combined::null_string file: 'file' line: 42 function: 'func' - --- + ... 1..9