diff options
Diffstat (limited to 'tests/run_simple_test.sh')
| -rwxr-xr-x | tests/run_simple_test.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/run_simple_test.sh b/tests/run_simple_test.sh new file mode 100755 index 0000000..6c1d56c --- /dev/null +++ b/tests/run_simple_test.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +input=$1 + +input=${input#*/tests/} +program=${input%%/*} + +input=${input#*/} +expected=${input%%/*} + +"./testbin-$program" "$1" +status=$? + +case $expected in + good) + [ "$status" -eq 0 ] + ;; + bad) + [ "$status" -ne 0 ] + ;; +esac |