X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Frun-program.test.sh;h=03778521bce05af1be75da7c6ee2a808ed2f7b3c;hb=cf49f2d086069a9c1b57f501df9a6a0bd3a34c3c;hp=133198e5a7fd6ac5312efe48d01640681b6e2e5e;hpb=f0338f6fa732b21daa4405e19465bd460e0526d9;p=sbcl.git diff --git a/tests/run-program.test.sh b/tests/run-program.test.sh index 133198e..0377852 100644 --- a/tests/run-program.test.sh +++ b/tests/run-program.test.sh @@ -8,16 +8,27 @@ # While most of SBCL is derived from the CMU CL system, the test # files (like this one) were written from scratch after the fork # from CMU CL. -# +# # This software is in the public domain and is provided with # absolutely no warranty. See the COPYING and CREDITS files for # more information. +. ./subr.sh + # Make sure that there's at least something in the environment (for # one of the tests below). -export SOMETHING_IN_THE_ENVIRONMENT='yes there is' +SOMETHING_IN_THE_ENVIRONMENT='yes there is' +export SOMETHING_IN_THE_ENVIRONMENT +PATH=/some/path/that/does/not/exist:${PATH} +export PATH -${SBCL:-sbcl} <&2") + :output s :search t :error :output :wait t)))) + (assert (string= str (format nil "Foo~%Bar~%")))) + + ;; end of file in the middle of a UTF-8 character + (typep (nth-value 1 (ignore-errors + (let ((sb-impl::*default-external-format* :utf-8)) + (with-output-to-string (s) + (run-program "printf" '("\\316") + :output s :search t :wait t))))) + 'error) + ;; success convention for this Lisp program run as part of a larger script - (sb-ext:quit :unix-status 52))) + (sb-ext:quit :unix-status *exit-ok*))) EOF -if [ $? != 52 ]; then - echo test failed: $? - exit 1 -fi - -# known bugs: -# -# sbcl-0.6.8: -# -# (SB-EXT:RUN-PROGRAM "echo" NIL) -# => error in function SB-IMPL::%ENUMERATE-SEARCH-LIST: -# Undefined search list: path -# -# (SB-EXT:RUN-PROGRAM "/bin/uname" '("-a") :OUTPUT :STREAM) -# doesn't return a STREAM (the way doc string claims) +check_status_maybe_lose "run program tests" $? -# success convention -exit 104 +exit $EXIT_TEST_WIN