Merge git://sbcl.boinkor.net/sbcl
[sbcl/lichteblau.git] / tests / init.test.sh
blob8f5f7351720ade813c6284a2445f69164847703b
1 #!/bin/sh
3 # tests related to loading init 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="init-test-sh-$$.core"
17 rm -f $tmpcore
19 $SBCL <<EOF
20 (defun custom-userinit-pathname ()
21 "$SBCL_PWD/custom-userinit.lisp")
22 (defun custom-sysinit-pathname ()
23 "$SBCL_PWD/custom-sysinit.lisp")
24 (setf sb-impl::*userinit-pathname-function* 'custom-userinit-pathname
25 sb-impl::*sysinit-pathname-function* 'custom-sysinit-pathname)
26 (save-lisp-and-die "$tmpcore")
27 EOF
28 if [ $? != 0 ]; then
29 echo "failure saving core"
30 exit 1
32 $SBCL_ALLOWING_CORE --core "$tmpcore" --disable-debugger <<EOF
33 (userinit-quit (sysinit-21))
34 EOF
35 if [ $? = 21 ]; then
36 echo "/Default userinit and sysinit loading worked, good"
37 else
38 echo "failure loading user/sysinit files: $?"
39 exit 1
42 rm -f $tmpcore
43 echo "/returning success from init.test.sh"
44 exit 104