Optional support for zlib-based in-memory deflate/inflate for core files
[sbcl.git] / tests / core.test.sh
index b483b68..9ffec8c 100644 (file)
@@ -94,9 +94,9 @@ chmod u+x "$tmpcore"
   (save-lisp-and-die "$tmpcore" :executable t :save-runtime-options t)
 EOF
 chmod u+x "$tmpcore"
-./"$tmpcore" --version --eval '(sb-ext:quit)' <<EOF
-  (when (equal *posix-argv* '("./$tmpcore" "--version" "--eval" "(sb-ext:quit)"))
-    (sb-ext:quit :unix-status 42))
+./"$tmpcore" --no-userinit --version --eval '(quit)' <<EOF
+  (when (equal *posix-argv* '("./$tmpcore" "--version" "--eval" "(quit)"))
+    (quit :unix-status 42))
 EOF
 status=$?
 if [ $status != 42 ]; then
@@ -104,4 +104,21 @@ if [ $status != 42 ]; then
     exit 1
 fi
 
+rm "$tmpcore"
+run_sbcl <<EOF
+  (save-lisp-and-die "$tmpcore" :toplevel (lambda () 42)
+                      :compression (and (member :sb-core-compression *features*) t))
+EOF
+run_sbcl_with_core "$tmpcore" --no-userinit --no-sysinit
+check_status_maybe_lose "SAVE-LISP-AND-DIE :COMPRESS" $? 0 "(compressed saved core ran)"
+
+rm "$tmpcore"
+run_sbcl <<EOF
+  (save-lisp-and-die "$tmpcore" :toplevel (lambda () 42) :executable t
+                     :compression (and (member :sb-core-compression *features*) t))
+EOF
+chmod u+x "$tmpcore"
+./"$tmpcore" --no-userinit --no-sysinit
+check_status_maybe_lose "SAVE-LISP-AND-DIE :EXECUTABLE-COMPRESS" $? 0 "(executable compressed saved core ran)"
+
 exit $EXIT_TEST_WIN