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:
parent
13a79b5e8f
commit
c88a232a40
1 changed files with 9 additions and 0 deletions
|
@ -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." \
|
||||
|
|
Loading…
Reference in a new issue