summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtest.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/test.sh b/test.sh
index 6b1971f..1e7137f 100755
--- a/test.sh
+++ b/test.sh
@@ -2,8 +2,14 @@
set -euo pipefail
stack build
prog="$(stack path --local-install-root)/bin/lisp"
+ok=1
for f in tests/*.lisp; do
- echo "$f"
- diff -u <("$prog" "$f") "$(sed 's/\.lisp$/.out/' <<<"$f")"
+ echo "- $f"
+ diff -u <("$prog" "$f") "$(sed 's/\.lisp$/.out/' <<<"$f")" || ok=0
done
-echo "All OK"
+if [[ $ok -eq 1 ]]; then
+ echo "All OK"
+else
+ echo "Some tests failed!"
+ exit 1
+fi