Release 0.51.0
Release 0.51.0 reduces the work around each test and still supports Bash 3.0. It also corrects coverage, which shows the code your tests ran, for statements spread across several lines. Similar test names and cleanup after a time limit work more reliably too.
Faster setup, cleanup and test counting
Tests that define set_up or tear_down no longer create and remove extra output files for each call. In a recorded measurement on a Mac with an ARM processor and Bash 3.2, a test using these functions fell from 14.1 ms to 5.4 ms, about 2.6 times faster (#1345).
bashunit now looks up a test's file and line only when needed instead of starting a separate shell for every test run in sequence. In another measurement on the same platform, a 500-test file fell from 2.75 seconds to 2.40 seconds (#1346).
To show the number of tests before a run, bashunit reuses information it already found while reading test functions. Files whose test count needs more work are still loaded as before. These include files that supply several sets of test inputs, contain text spread across lines, or create functions while they run. Across the repository's 241-file measurement, counting fell from 1.72 seconds to 1.51 seconds (#1347).
When Bash cannot read the clock directly through EPOCHREALTIME, parallel runs also stop checking which clock to use for every test. The 500-test check now starts Perl twice instead of 502 times.
More accurate coverage
Coverage counts every line of arrays, quoted text, blocks of text written with <<, and commands continued onto another line. Previously an array spread across several lines could look partly untested, and on Bash 3.x could look entirely untested. Running an outer command also no longer marks commands inside $(...) or <(...) as tested unless they ran (#1338).
Test names and cleanup fixes
test_a and test_ab are no longer mistaken for the same function defined twice. An --exclude-filter value containing a comma stays one test name; repeat the option to exclude several names. The environment setting BASHUNIT_EXCLUDE_FILTER still uses commas to separate names.
Tests that reach their time limit get a limited chance to finish tear_down. bashunit waits for the test itself to exit rather than assuming a short fixed delay is always enough. Parallel runs also stop displaying Bash's warning about grouping running processes as though a test file had printed it (#1344).
Helpers can now choose faster code for a newer Bash when loaded, while keeping the existing code for Bash 3.0. The minimum supported version stays the same.
See the full changelog for 0.51.0 on GitHub.