Problem
--report-tap writes the test description verbatim, so a # in a name reaches
the consumer as a TAP directive marker. Both tests below pass:
functiontest_directive_lookalike() {
bashunit::set_test_title "check # SKIP me"
assert_same "a""a"
}
functiontest_todo_lookalike() {
bashunit::set_test_title "rename # TODO later"
assert_same "a""a"
}and the report says:
TAP version 13
1..2
ok 1 - check # SKIP me
ok 2 - rename # TODO later
which any TAP parser reads as skipped and todo respectively — I checked
with a parser implementing the usual #\s*(SKIP|TODO) rule. A green test
silently disappears from the count on a CI dashboard.
Realistic names hit this: "logs # TODO remove", "skip # SKIP on CI", or a
title carrying an issue reference like "fix # SKIP flake".
Fix
TAP 13 says a description must not contain an unescaped #; escape it as \#
(and escape a literal backslash first, so \# in a name survives as itself).
The directives bashunit emits are appended after the description, so they are
unaffected.
Applies to every ok/not ok line in src/reports/tap.sh.
Problem
--report-tapwrites the test description verbatim, so a#in a name reachesthe consumer as a TAP directive marker. Both tests below pass:
and the report says:
which any TAP parser reads as skipped and todo respectively — I checked
with a parser implementing the usual
#\s*(SKIP|TODO)rule. A green testsilently disappears from the count on a CI dashboard.
Realistic names hit this:
"logs # TODO remove","skip # SKIP on CI", or atitle carrying an issue reference like
"fix # SKIP flake".Fix
TAP 13 says a description must not contain an unescaped
#; escape it as\#(and escape a literal backslash first, so
\#in a name survives as itself).The directives bashunit emits are appended after the description, so they are
unaffected.
Applies to every
ok/not okline insrc/reports/tap.sh.