diff options
Diffstat (limited to 'src/util')
| -rw-r--r-- | src/util/shtests.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/util/shtests.sh b/src/util/shtests.sh index 44ad48e..fbd15b6 100644 --- a/src/util/shtests.sh +++ b/src/util/shtests.sh @@ -20,6 +20,9 @@ runtest () { test_name=$(echo $1 | sed "s/_/ /g") test_func="$2" printf "${BLUE}[ ] ${RESET}$test_name "; + + command -v pre_test > /dev/null 2>&1 && pre_test + if "$test_func" ; then printf "\r$PASS\n" return 0 @@ -27,6 +30,8 @@ runtest () { printf "\r$FAIL\n" return 1 fi + + command -v post_test > /dev/null 2>&1 && post_test } # TODO use getopt for this |
