Added bootstrap argument passing, stricter and more controllable execution modes, and safer internals through full namespacing.
✨ Improvements
- Add bootstrap argument passing support via
--env "file.sh arg1 arg2" - Add
--preserve-envflag to skip.envloading and use shell environment only - Add
-l, --loginflag to run tests in login shell context - Add
--strictflag to enable strict shell mode (set -euo pipefail) for tests - Add
BASHUNIT_STRICT_MODEconfiguration option (default:false) - Add
-R, --run-allflag to run all assertions even when one fails - Add
BASHUNIT_STOP_ON_ASSERTION_FAILUREconfiguration option (default:true)
🛠️ Changes
- BREAKING: Namespace all internal functions and variables to prevent collisions with user code
- All helper functions now use
bashunit::prefix (e.g.,skip→bashunit::skip) - All internal functions now use
bashunit::prefix (e.g.,helper::trim→bashunit::helper::trim) - All internal variables now use
_BASHUNIT_prefix (e.g.,_TESTS_PASSED→_BASHUNIT_TESTS_PASSED) - All
assert_*functions remain unchanged (public API)
- All helper functions now use
🐛 Bug Fixes
- Improve
assertcommand output: showassert <fn>instead of internal function name in failure messages - Custom assertions now display the correct test function name in failure messages
- Data providers now work when
set_up_before_scriptchanges directory - Subsequent test files now run when
set_up_before_scriptchanges directory - Catch intermediate failing commands in
set_up_before_scriptandtear_down_after_script
👥 Contributors
@Chemaclass @JesusValeraDev @cnaples79
🔐 Checksum
90d5afc07222920777d6c47af657d1d7a80a0055eaaa506c9c814f6b224da102 bin/bashunit
Full Changelog: 0.28.0...0.29.0