Release 0.40.0
New features
Abort hanging tests with --test-timeout
A single hanging test could stall an entire run. The new --test-timeout <seconds> flag (or BASHUNIT_TEST_TIMEOUT) aborts any test that runs longer than the given number of seconds, marks it failed, and keeps running the rest. It is disabled by default (0), needs no external timeout command, and works on Bash 3.2+ (#721):
bash
bashunit --test-timeout 5 tests/
# or
BASHUNIT_TEST_TIMEOUT=5 bashunit tests/Bug fixes
- A test that exited non-zero no longer poisons the exit code of later tests in the same file; the per-test exit code is now reset between tests.
- Coverage now counts backslash line-continuation lines as covered: a multi-line statement's hit is propagated across its continuation chain, so the lines after a trailing
\are no longer reported as uncovered (#722). - Spying or mocking the
printfbuiltin no longer breaks coverage collection. The coverage buffer is now flushed withbuiltin printf, so a test double can no longer shadow the write and silently drop coverage data for that test (#724).
Changes
- URLs and project links now point to the new primary domain bashunit.com. The old
bashunit.typeddevs.comcontinues to work as a redirect. - The docs site now deploys to GitHub Pages on the
bashunit.comcustom domain.
Removed
- The weekly-downloads chart on the docs homepage, whose data source was not portable. It may be revisited later.
See the full changelog for 0.40.0 on GitHub.