diff options
| author | davidovski <david@davidovski.xyz> | 2026-10-06 11:08:52 +0100 |
|---|---|---|
| committer | davidovski <david@davidovski.xyz> | 2026-10-06 11:08:52 +0100 |
| commit | 41cfdcbb58a946718e7c665e8d3600e41ebb0bd3 (patch) | |
| tree | ebf63ffd3b76ee9ea158f54c6cd3949b7674b6ba | |
| parent | eca55e60c29440c4e2e007b54ea1a1983e965954 (diff) | |
| -rw-r--r-- | src/util/shtests.sh | 5 | ||||
| -rwxr-xr-x | test/parseconf.sh | 2 |
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" |
