No unreleased changes yet
1.1.1 - 2021-02-15
- The MIT license notice at the top of bashaspec.sh now explicitly only covers the file itself. This should make it clearer that the license does not make any claim about other files in repositories that bashaspec is copied into.
1.1.0 - 2021-02-15
- Stderr is now captured and suppressed for passing tests, like stdout.
1.0.0 - 2021-02-08
- Documentation updates.
- Report 0 test runs if 0 tests ran.
- bashaspec.sh must now be sourced after defining test functions.
- The
before_all
andafter_all
hooks now correctly report failure withset -e
.
- Support for pre-POSIX heirloom bourne shell, in the alternate
bashaspec-ancient.sh
version.
- Bash and zsh no longer require
_bashaspec_test_file
when changing directory outside of a test function.
- Zsh support: zsh has a builtin
functions
variable, so bashaspec now lists its functions in thefns
variable instead.
- Support non-bash shells (like dash and ksh).
- This update requires the
_bashaspec_test_file
variable to be set to the full path of the test file, if the test file changes directory outside of a test function.
- This update requires the
- Support running on macs with BSD
find
/wc
. - Support bash 3.2 (which is the latest version of bash on macs).
- Support tests with
set -e
. - When directly executing bashaspec.sh to run all test files, bashaspec reports the number of passing files.
- Verbose mode is enabled with the
-v
flag instead of the VERBOSE environment variable. - Test function and before/after hook invocation now mirror JUnit logic:
before_all
runs if defined. If it fails, the file is marked as failed and exits.- The tests run:
before_each
runs if defined. If it fails, the test is marked as failed.- If before_each succeeded, the main test function runs. If it fails, the test is marked as failed.
after_each
runs if defined. If it fails, the test is marked as failed.
after_all
runs if defined. If it fails, the file is marked as failed and exits. Previously, a test was marked as failed only if the main test function failed, and if before_each failed, after_each did not run.
- Verbose mode now correctly exits 1 if a test failed.
- The
--verbose
or-v
flag now produces verbose output when directly executing bashaspec.sh.
Initial release - 2020-07-23
- bashaspec