diff options
| author | peter <peter@pmikkelsen.com> | 2026-09-20 20:58:10 +0000 |
|---|---|---|
| committer | peter <peter@pmikkelsen.com> | 2026-09-20 20:58:10 +0000 |
| commit | aa51adcfc9a79c606aa4435dc64dd5f160efbde1 (patch) | |
| tree | b0e50185da9e93e38cf7e651eb92592bd57ea23a /tests/run_script_test.sh | |
| parent | 83bdc0e59232434fc30f94e2fc3a22e81989e4dd (diff) | |
Start working on migrating to autoconf/automake instead of cmake
FossilOrigin-Name: d870487495106763d2a4e416f1ddbf4c795081a6b77100d34063591e385692e0
Diffstat (limited to 'tests/run_script_test.sh')
| -rwxr-xr-x | tests/run_script_test.sh | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/run_script_test.sh b/tests/run_script_test.sh new file mode 100755 index 0000000..cef7add --- /dev/null +++ b/tests/run_script_test.sh @@ -0,0 +1,39 @@ +#!/bin/sh + +input=$1 + +input=${input#*/tests/scripts/} +expected=${input%%/*} +ext=${input##*.} + +check() +{ + status=$1 + case $expected in + bad) + [ "$status" -ne 0 ] + ;; + *) + [ "$status" -eq 0 ] + ;; + esac + if [ "$?" -ne 0 ]; then + exit 1 + fi +} + +"$1" +check $? + +case "$ext" in + aplwc) + aplwc "$1" + check $? + ;; +esac + +case $expected in + *) + "$srcdir/tests/scripts/simfail.sh" "$1" + check $? +esac |