# 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="$1"
-
-$sbcl <<EOF
+${SBCL:-sbcl} <<EOF
+ ;; test that $PATH is searched
+ (assert (zerop (sb-ext:process-exit-code
+ (sb-ext:run-program "true" () :search t :wait t))))
+ (assert (not (zerop (sb-ext:process-exit-code
+ (sb-ext:run-program "false" () :search t :wait t)))))
(let ((string (with-output-to-string (stream)
(sb-ext:run-program "/bin/echo"
'("foo" "bar")
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)
-
# success convention
exit 104