Add meta tests, to validate handling of functions for subshells

This commit is contained in:
Eric Levy 2022-01-24 17:04:49 -05:00
parent 67bd586575
commit 3cd32a4a0e
3 changed files with 25 additions and 0 deletions

0
meta-tests.txt Normal file
View File

23
run-meta-tests Normal file
View File

@ -0,0 +1,23 @@
#!/usr/bin/env bash
cd "$(dirname "$0")" || exit 1
for TEST in $(cat meta-tests.txt); do
echo -n "meta:$TEST ... "
(
meta-tests/${TEST}.sh > /dev/null 2> /dev/null
)
statusCode=$?
if [[ $statusCode -ne 0 ]]; then
echo "FAIL (status code $statusCode)"
FAIL=$(( FAIL + 1 ))
else
echo "ok"
PASS=$(( PASS + 1 ))
fi
done

View File

@ -9,6 +9,8 @@ FAIL=0
source ./run-basic-tests source ./run-basic-tests
source ./run-meta-tests
echo "" echo ""
echo "Pass: $PASS" echo "Pass: $PASS"
echo "Fail: $FAIL" echo "Fail: $FAIL"