X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=tests%2Fscript.test.sh;h=33483bad68b7cd0f2146308afcc5b33c70da1222;hb=b14aefb22fd710673b1a1005add3c0425713d2a0;hp=38acfe0a8436a803c68cd198208f11474f2a1567;hpb=d7952c5aacc3ec295e148cdf1d24eec3f6509e81;p=sbcl.git diff --git a/tests/script.test.sh b/tests/script.test.sh index 38acfe0..33483ba 100644 --- a/tests/script.test.sh +++ b/tests/script.test.sh @@ -21,9 +21,9 @@ tmpscript=$TEST_FILESTEM.lisp-script tmpout=$TEST_FILESTEM.lisp-out tmperr=$TEST_FILESTEM.lisp-err -echo '(quit :unix-status 7)' > $tmpscript +echo '(exit :code 7)' > $tmpscript run_sbcl --script $tmpscript -check_status_maybe_lose "--script exit status from QUIT" $? 7 "(quit status good)" +check_status_maybe_lose "--script exit status from EXIT" $? 7 "(status good)" echo '(error "oops")' > $tmpscript run_sbcl --script $tmpscript 1> $tmpout 2> $tmperr @@ -38,18 +38,32 @@ run_sbcl --script $tmpscript check_status_maybe_lose "--script exit status from normal exit" $? 0 "(everything ok)" cat > $tmpscript </dev/null +check_status_maybe_lose "--script exit status from QUIT when standard-output closed" $? 3 "(as given)" +run_sbcl --load $tmpscript >/dev/null +check_status_maybe_lose "--load exit status from QUIT when standard-output closed" $? 3 "(as given)" + +cat > $tmpscript </dev/null +check_status_maybe_lose "--script exit status from QUIT when original standard-output closed" $? 3 "(as given)" +run_sbcl --load $tmpscript >/dev/null +check_status_maybe_lose "--load exit status from QUIT when original standard-output closed" $? 3 "(as given)" + +cat > $tmpscript </dev/null -check_status_maybe_lose "--script exit status from QUIT when stdout closed" $? 3 "(as given)" +check_status_maybe_lose "--script exit status from EXIT when stdout closed" $? 3 "(as given)" run_sbcl --load $tmpscript >/dev/null -check_status_maybe_lose "--load exit status from QUIT when stdout closed" $? 3 "(as given)" +check_status_maybe_lose "--load exit status from EXIT when stdout closed" $? 3 "(as given)" cat > $tmpscript <