bash_test_tools icon indicating copy to clipboard operation
bash_test_tools copied to clipboard

Support for inline tests

Open thorstenkampe opened this issue 8 years ago • 0 comments

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

thorstenkampe avatar Nov 24 '16 06:11 thorstenkampe