0
0
Fork 0
mirror of https://github.com/atmoz/sftp.git synced 2024-11-17 12:51:33 -05:00

Add beforeTest and afterTest in bashunit

This commit is contained in:
Adrian Dvergsdal 2015-11-23 13:37:46 +01:00
parent 13a79b5e8f
commit c88a232a40

View file

@ -1,3 +1,4 @@
#!/usr/bin/env bash
########################################################################
@ -164,8 +165,16 @@ runTests() {
exit 0
fi
if [ "$(type -t "beforeTest")" == "function" ]; then
beforeTest
fi
for tc in $testcases ; do $tc ; done
if [ "$(type -t "afterTest")" == "function" ]; then
afterTest
fi
if [ $verbose -ge 1 ] ; then
echo "Done. $bashunit_passed passed." \
"$bashunit_failed failed." \