Release 0.23.0 β
π§ New features β
Support for .bash
test files β
You can now name your test files using the .bash
extension. This aligns with shell scripting conventions and improves compatibility with syntax-aware editors.
bash
tests/example_test.bash
bash
bashunit tests/
Custom test titles with set_test_title
β
Set a descriptive title for your test function using the new set_test_title
function. This makes your output clearer and more expressive.
bash
function test_custom_named() {
set_test_title "User-friendly title"
assert_equal 1 1
}
β User-friendly title
New assert_exec
utility β
Use assert_exec
to verify command execution success or failure, along with optional assertions on stdout and stderr.
bash
function sample() {
echo "out"
echo "err" >&2
return 1
}
function test_success() {
assert_exec sample --exit 1 --stdout "out" --stderr "err"
}
function test_failure() {
assert_exec sample --exit 0 --stdout "out" --stderr "err"
}
β Passed: Success 30 ms
β Failed: Failure
Expected 'exit: 0
stdout: out
stderr: err'
but got 'exit: 1
stdout: out
stderr: err'
π Bugfix β
Clock fallback for second-only resolution β
The internal clock logic now detects and falls back when nanosecond resolution isnβt available, preventing inaccurate benchmarks on minimal environments.
πΎ Miscellaneous β
- Enforced minimum supported Bash version: 3.2
- Updated docs for mocking usage with examples and explanations
- Skipped test report tracking unless explicitly requested via option or env
See the full changelog on GitHub