Closed djpohly closed 9 months ago
AI Summary deactivated by djpohly
#239 - Support Bash "strict mode" (and fix one unit test) - By djpohly Just now
#238 - Copy pre-commit hook to real GIT_DIR - By djpohly 22 minutes ago
#232 - Fix test doubles - By antonio-gg-dev 3 weeks ago
bashunit is an open repo and Watermelon will serve it for free. 🍉🫶
It seems that it is not working as expected for macos... I will check it out when I find some time these days
I will merge this branch into an internal one with the same name strictmode
, so I can check it out and play around to reproduce the bug easier, while keeping the original commits from @djpohly 👍🏼
📚 Description
Some script authors like to use "unofficial Bash strict mode", enough so that supporting it shows up in comparisons of shell testing frameworks.
Case in point: enabling the -u option uncovered a bug in
test_unsuccessful_assert_is_directory_not_writable
that is fixed in this PR.🔖 Changes
set -euo pipefail
enabled.$a_file
was supposed to be$a_directory
).((...))
, which exit 1 if their result happens to be zero, are fixed with|| true
.check_duplicate_functions
does not appear to be intended to cause the script to fail, so it is also silenced with|| true
.${1-}
."${varname=default}"
.set_up
) will not be run instead.✅ To-do list
CHANGELOG.md
to reflect the new feature or fixI updated the documentation to reflect the changes(Not sure there's anything to document, since this fix doesn't require users to do anything different.)