Skip to content

test(state): cover print_tap_line's seven output branches#821

Merged
Chemaclass merged 1 commit into
mainfrom
test/tap-line-unit-tests
Jul 16, 2026
Merged

test(state): cover print_tap_line's seven output branches#821
Chemaclass merged 1 commit into
mainfrom
test/tap-line-unit-tests

Conversation

@Chemaclass

Copy link
Copy Markdown
Member

🤔 Background

bashunit::state::print_tap_line — the TAP output conversion — had no direct tests; its format was only pinned indirectly by two acceptance snapshots.

💡 Changes

  • Unit tests for all seven branches: successful (colors + duration stripped), failure (--- YAML block, header excluded, details re-indented), skipped with/without reason, incomplete, snapshot, risky, and the unknown-type fallback.
  • Counter mutations stay inside $() captures — suite state untouched, parallel-safe.

The TAP conversion had no direct tests. Pin each branch's format: successful
(ANSI colors and trailing duration stripped), failure (not ok + '---' YAML
block with the Failed:/Error: header excluded and details re-indented),
skipped with and without a reason (# SKIP), incomplete (# TODO incomplete),
snapshot (# snapshot), risky (# RISKY no assertions), and the unknown-type
fallback (not ok). Counters are mutated only inside $() captures, so the
suite's own state is untouched.
@Chemaclass Chemaclass added the enhancement New feature or request label Jul 16, 2026
@Chemaclass Chemaclass self-assigned this Jul 16, 2026
@Chemaclass
Chemaclass merged commit 40778c0 into main Jul 16, 2026
37 checks passed
@Chemaclass
Chemaclass deleted the test/tap-line-unit-tests branch July 16, 2026 05:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant