# Run the regression tests in this directory.
# how we invoke SBCL
-sbcl=${1:-sbcl --noprint --noprogrammer}
+sbcl=${1:-sbcl --noinform --noprint --noprogrammer}
+
+# "Ten four" is the closest numerical slang I can find to "OK", so
+# it's the return value we expect from a successful test.
+tenfour () {
+ if [ $? = 104 ]; then
+ echo ok
+ else
+ echo test failed: $?
+ return 1
+ fi
+}
# *.pure.lisp files are ordinary Lisp code with no side effects,
# and we can run them all in a single Lisp process.
-(for f in *.pure.lisp; do echo \"$f\"; done) | $sbcl < pure.lisp
+(for f in *.pure.lisp; do echo \"$f\"; done) | $sbcl ; tenfour
# *.impure.lisp files are Lisp code with side effects (e.g. doing DEFSTRUCT
# or DEFTYPE or DEFVAR). Each one needs to be run as a separate
# invocation of Lisp.
for f in *.impure.lisp; do
- echo $f | $sbcl < pure.lisp
+ echo $f | $sbcl ; tenfour
done
-# *.test.sh files are scripts to test stuff. A file foo.test.sh
+# *.test.sh files are scripts to test stuff, typically stuff which can't
+# so easily be tested within Lisp itself. A file foo.test.sh
# may be associated with other files foo*, e.g. foo.lisp, foo-1.lisp,
# or foo.pl.
for f in *.test.sh; do
- sh $f
+ sh $f ; tenfour
+done
+
+# *.assertoids files contain ASSERTOID statements to test things
+# interpreted and at various compilation levels.
+for f in *.assertoids; do
+ echo "(load \"$f\")" | $sbcl --eval '(load "assertoid.lisp")' ; tenfour
done