bash_test_tools
bash_test_tools copied to clipboard
Support for inline tests
Does bash_test_tools
support inline tests within a script? I would like to test a shell script on a per function base and not just the script as a whole. And of course, I don't want to duplicate the script's functionality in a test script.
production.sh
test_a() {a test_arg}
a() {whatever}
test_b() {b test_arg}
b() {whatever}
if condition
then
source bash_test_tools
testrunner
else
a arg
b arg
fi