Skip to content

Conversation

@mtsiakkas
Copy link

@mtsiakkas mtsiakkas commented Jan 15, 2026

Summary

  • Add -output cli flag
  • Print new table with test stdout output when the above is set

Motivation

Currently to see any output generated by tests we need to fail on purpose; this obviously not ideal.

Sample Output

╭─────────────────────────────┬───────────────────────────────────────────┬─────────────╮
│            Test             │                  Package                  │   Output    │
├─────────────────────────────┼───────────────────────────────────────────┼─────────────┤
│ TestFindLongestCommonPrefix │ github.com/mfridman/tparse/internal/utils │ TEST OUTPUT │
│                             │                                           │             │
│ TestSortName                │ github.com/mfridman/tparse/tests          │ TEST OUTPUT │
│ TestSummaryCounts           │ github.com/mfridman/tparse/tests          │ TEST OUTPUT │
╰─────────────────────────────┴───────────────────────────────────────────┴─────────────╯
╭────────┬──────────┬───────────────────────────────────────────┬───────┬──────┬──────┬──────╮
│ Status │ Elapsed  │                  Package                  │ Cover │ Pass │ Fail │ Skip │
├────────┼──────────┼───────────────────────────────────────────┼───────┼──────┼──────┼──────┤
│  PASS  │  0.01s   │ github.com/mfridman/tparse/internal/utils │  --   │  12  │  0   │  0   │
│  PASS  │ (cached) │ github.com/mfridman/tparse/parse          │  --   │  43  │  0   │  0   │
│  PASS  │  0.02s   │ github.com/mfridman/tparse/tests          │  --   │ 142  │  0   │  0   │
╰────────┴──────────┴───────────────────────────────────────────┴───────┴──────┴──────┴──────╯

when set any test output printed to stdout prefixed with "--- OUTPUT: "
will be parsed and printed to a new table
checks whether event output is an update or result string based on
updatePrefix* and resultPrefix*
voids the need for prefixing/tagging test output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant