5 tmpcore
=${TEST_FILESTEM}_a.core
6 # unix can write a new file to same name as the one we're executing
8 tmpcore2
=${TEST_FILESTEM}_b.core
10 # Regression test for https://bugs.launchpad.net/sbcl/+bug/411925
11 # saving runtime options _from_ executable cores
13 (save-lisp-and-die "$tmpcore" :executable t)
16 .
/"$tmpcore" --no-userinit --no-sysinit --noprint <<EOF
17 (save-lisp-and-die "$tmpcore2" :executable t :save-runtime-options t)
20 .
/"$tmpcore2" --no-userinit --no-sysinit --noprint --versions --eval '(exit)' <<EOF
21 ;; tbh I have no idea how this asserts anything about saving options from executable
22 ;; cores with saved options
23 (when #+unix (equal *posix-argv* '("./$tmpcore2" "--versions" "--eval" "(exit)"))
24 #-unix (equal (cdr *posix-argv*) '("--versions" "--eval" "(exit)"))
28 rm "$tmpcore" "$tmpcore2"
29 if [ $status -ne 42 ]; then
30 echo "saving runtime options from executable failed"