Fix make-array transforms.
[sbcl.git] / tests / init.test.sh
index a545d55..642d5ca 100644 (file)
 # absolutely no warranty. See the COPYING and CREDITS files for
 # more information.
 
-tmpcore="init-test-sh-$$.core"
-rm -f $tmpcore
+. ./subr.sh
 
-$SBCL <<EOF
+use_test_subdirectory
+
+tmpcore="init-test.core"
+
+run_sbcl <<EOF
+  (require :sb-introspect)
   (defun custom-userinit-pathname ()
      "$SBCL_PWD/custom-userinit.lisp")
   (defun custom-sysinit-pathname ()
@@ -25,16 +29,18 @@ $SBCL <<EOF
         sb-impl::*sysinit-pathname-function* 'custom-sysinit-pathname)
   (save-lisp-and-die "$tmpcore")
 EOF
-$SBCL_ALLOWING_CORE --core "$tmpcore" --disable-debugger <<EOF
-  (userinit-quit (sysinit-21))
-EOF
-if [ $? = 21 ]; then
-    echo "/Default userinit and sysinit loading worked, good"
-else
-    echo "failure loading user/sysinit files: $?"
+if [ $? != 0 ]; then
+    echo "failure saving core"
     exit 1
 fi
+run_sbcl_with_core "$tmpcore" --disable-debugger <<EOF
+  (assert (string= (custom-sysinit-pathname)
+                   (namestring
+                    (sb-introspect:definition-source-pathname
+                     (car (sb-introspect:find-definition-sources-by-name
+                           'sysinit-21 :function))))))
+  (userinit-quit (sysinit-21))
+EOF
+check_status_maybe_lose "userinit and sysinit loading" $? 21 "(loading worked)"
 
-rm -f $tmpcore
-echo "/returning success from init.test.sh"
-exit 104
+exit $EXIT_TEST_WIN