0.8.4.9:
[sbcl/lichteblau.git] / tests / core.test.sh
blobc60f09983cac3272f21eca97171302c240c4d460
1 #!/bin/sh
3 # tests related to .core files
5 # This software is part of the SBCL system. See the README file for
6 # more information.
8 # While most of SBCL is derived from the CMU CL system, the test
9 # files (like this one) were written from scratch after the fork
10 # from CMU CL.
12 # This software is in the public domain and is provided with
13 # absolutely no warranty. See the COPYING and CREDITS files for
14 # more information.
16 tmpcore="core-test-sh-$$.core"
17 rm -f $tmpcore
19 # In sbcl-0.7.7 SAVE-LISP-AND-DIE didn't work at all because of
20 # flakiness caused by consing/GC/purify twice-and-at-least-twice
21 # mismatch grot.
23 # "serves yall right for fiddling with too much stuff"
24 # -- Eric Marsden, <http://tunes.org/~nef/logs/lisp/02.09.15>
26 # diagnosed and fixed by Dan Barlow in sbcl-0.7.7.29
27 $SBCL <<EOF
28 (defun foo (x) (+ x 11))
29 (save-lisp-and-die "$tmpcore")
30 EOF
31 $SBCL_ALLOWING_CORE --core "$tmpcore" \
32 --userinit /dev/null --sysinit /dev/null <<EOF
33 (quit :unix-status (foo 10))
34 EOF
35 if [ $? = 21 ]; then
36 echo "/Basic SAVE-LISP-AND-DIE worked, good."
37 else
38 echo "failure in basic SAVE-LISP-AND-DIE: $?"
39 exit 1
42 rm -f $tmpcore
43 echo "/returning success from core.test.sh"
44 exit 104