You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
--output tap does not escape # in a test description, so a failing test can be read as skipped #1309
TAP 13 reads an unescaped # on a test line as the start of a directive. --output tap interpolates the description raw, so a title containing one hands the consumer a directive bashunit never meant.
A TAP consumer parses that as result not ok, description validates input, directive SKIP unsupported — and a not ok carrying a SKIP directive is not a failure. The failure leaves CI silently. # TODO does the same to a passing test.
💡 Cause
There are two TAP emitters, and only one escapes.
bashunit::reports::__tap_description (src/reports/tap.sh) was written for exactly this, for #1119 — its comment even names the case — including the [#] workaround for Bash 3.0 reading a bare # after // as anchor-to-start. It is used by the --report-tap file writer.
The --output tap stream is written by src/console/line.sh instead, and never calls it:
$ ... --report-tap r.tap -> not ok 1 - validates input \# SKIP unsupported
$ ... --output tap -> not ok 1 - validates input # SKIP unsupported
Applying the existing helper to the description in console/line.sh closes it. Only the description: the # SKIP / # TODO / # snapshot / # RISKY directives those lines append are bashunit's own and must stay literal.
💡 Found by
Continuing the report-writer sweep from #1305/#1307 into TAP.
Activity
Chemaclass commentedon Aug 17, 2026
Fixed in #1310 (merged).