blob: 21ce2627a452dcb77067fc9b66550795eb535601 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#!/usr/bin/env bash
set -euo pipefail
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"
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"
else
echo "Some tests failed!"
exit 1
fi
|