summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/util/shtests.sh5
-rwxr-xr-xtest/parseconf.sh2
2 files changed, 6 insertions, 1 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
diff --git a/test/parseconf.sh b/test/parseconf.sh
index 6eb50dc..7e83397 100755
--- a/test/parseconf.sh
+++ b/test/parseconf.sh
@@ -1,4 +1,4 @@
-#!/bin/shtests
+#!/usr/bin/env shtests
PARSECONF="./dist/parseconf"
SIMPLECONF="./test/simple.conf"