summaryrefslogtreecommitdiff
path: root/test.sh
diff options
context:
space:
mode:
authorTom Smeding <tom.smeding@gmail.com>2019-11-21 12:57:59 +0100
committerTom Smeding <tom.smeding@gmail.com>2019-11-21 12:57:59 +0100
commit15ebcc764c30c18f41f179d589ad1ad5a45194f1 (patch)
treee83ebfbd8b2dc5e8524bf3fd647f55b9b8702941 /test.sh
parentd4c554f62b007df2763c73ba7fd2b13814c186bc (diff)
Better string and IO support
Diffstat (limited to 'test.sh')
-rwxr-xr-xtest.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/test.sh b/test.sh
index 1e7137f..21ce262 100755
--- a/test.sh
+++ b/test.sh
@@ -4,8 +4,13 @@ stack build
prog="$(stack path --local-install-root)/bin/lisp"
ok=1
for f in tests/*.lisp; do
+ outf="$(sed 's/\.lisp$/.out/' <<<"$f")"
echo "- $f"
- diff -u <("$prog" "$f") "$(sed 's/\.lisp$/.out/' <<<"$f")" || ok=0
+ if [[ ! -f $outf ]]; then
+ echo "WARNING: $outf not found"
+ else
+ diff -u <("$prog" "$f") "$outf" || ok=0
+ fi
done
if [[ $ok -eq 1 ]]; then
echo "All OK"