Release 0.45.0
Release 0.45.0 adds ways to check symbolic links, pass arguments to command checks, and save multiple expected outputs in one test. It also fixes cases where invalid inputs or missing commands could produce misleading results.
Check the link itself
A symbolic link is a path that points to another file or directory. Most file checks follow the link and check its target. The new assert_is_symlink, assert_is_not_symlink, and assert_symlink_to check the link itself. They are useful for scripts that keep a link pointing to the current release (#981).
function test_current_release_link() {
assert_is_symlink "./current"
assert_symlink_to "./releases/42" "./current"
}Pass arguments directly to command checks
assert_true and assert_false now accept a command followed by its arguments. A single argument retains its previous meaning (#994).
function test_release_directory() {
assert_true test -d "./releases/42"
assert_false test -d "./releases/missing"
}Both checks now fail when the command is unknown or cannot be executed. A missing command is no longer accepted by assert_false as evidence that the intended condition was false; the failure message explains that the command could not run (#982).
Keep expected outputs separate and results reliable
Snapshots save expected output for comparison on later runs. Giving each snapshot a name lets a test save more than one expected value. When values differ, bashunit shows the snapshot file path and the --snapshot-update hint. Test paths starting from the filesystem root now find snapshots correctly. When Perl is unavailable, the alternative comparison checks the whole value, including any markers for text you chose to ignore (#986, #1002).
Input checks are stricter too. Core comparison checks reject missing arguments, date checks reject values they cannot read as dates, and assert_json_equals rejects invalid JSON. Runs with tests executing at the same time retain results from same-named test files in different directories.
Several existing checks start fewer extra processes. These include snapshots without ignored-text markers, counters that track command calls, text searches that ignore letter case, and common comparisons that allow a small numeric difference. The single-file executable also omits source comments while keeping text blocks inside shell commands and markers identifying source files. These changes reduce extra work while preserving how the checks behave.
See the full changelog for 0.45.0 on GitHub.