Release 0.28.0
🔧 New features
Subcommand-based CLI architecture
bashunit now uses a subcommand-based CLI design, making the interface cleaner and more intuitive:
bashunit test [path] # Run tests (default)
bashunit bench [path] # Run benchmarks
bashunit doc [filter] # Show assertion documentation
bashunit init [dir] # Initialize a new project
bashunit learn # Interactive tutorial
bashunit upgrade # Upgrade to latest versionThe previous flags (--bench, --doc, --init, --learn, --upgrade) continue to work for backward compatibility.
Inline filter syntax
Run specific tests directly from the command line using the new inline filter syntax:
bashunit tests/example_test.sh::test_my_functionbashunit tests/example_test.sh:42This makes it faster to rerun a single failing test during development.
Stop at first assertion failure
Tests now stop at the first assertion failure by default, matching the behavior of PHPUnit and Jest. This prevents cascading failures and makes debugging easier.
If you prefer to run all assertions regardless of failures, use the new --run-all flag or set BASHUNIT_STOP_ON_ASSERTION_FAILURE=false.
Display skipped and incomplete tests
New options to display skipped and incomplete tests at the end of the test run:
bashunit --show-skipped tests/
bashunit --show-incomplete tests/🐛 Bug fixes
- Stop executing remaining commands in
set_up/tear_downafter first failure - Count all tests as failed when
set_up_before_scriptfails - Fixed acceptance tests forcing not showing skipped and incomplete tests
🌾 Miscellaneous
- Optimize assertion guard: use integer comparison instead of string comparison
- Optimize string operations with
str::strip_ansirefactoring
See the full changelog on GitHub