diff options
Diffstat (limited to 'test/run_tests.sh')
-rwxr-xr-x | test/run_tests.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/run_tests.sh b/test/run_tests.sh new file mode 100755 index 0000000..12a0e1a --- /dev/null +++ b/test/run_tests.sh @@ -0,0 +1,21 @@ +#! /bin/bash + +failed=0 + +for suite in "$@"; do + echo "$suite:" + if ./$suite; then + echo "...pass" + else + echo "...FAIL" + failed=1 + fi +done + +if (($failed)); then + printf "\x1b[31;1mTESTS FAILED\x1b[0m\n" + exit 1 +fi + +printf "\x1b[32;1mall tests passed\x1b[0m\n" +exit 0 |