3 # tests related to --script
5 # This software is part of the SBCL system. See the README file for
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
12 # This software is in the public domain and is provided with
13 # absolutely no warranty. See the COPYING and CREDITS files for
20 tmpscript=$TEST_FILESTEM.lisp-script
22 echo '(quit :unix-status 7)' > $tmpscript
23 run_sbcl --script $tmpscript
24 check_status_maybe_lose "--script exit status from QUIT" $? 7 "(quit status good)"
26 echo '(error "oops")' > $tmpscript
27 run_sbcl --script $tmpscript
28 check_status_maybe_lose "--script exit status from ERROR" $? 1 "(error implies 1)"
30 echo 'nil'> $tmpscript
31 run_sbcl --script $tmpscript
32 check_status_maybe_lose "--script exit status from normal exit" $? 0 "(everything ok)"