0.9.5.34:
[sbcl.git] / tests / run-program.test.sh
index 94dcbad..00399d1 100644 (file)
@@ -17,7 +17,8 @@
 # one of the tests below).
 SOMETHING_IN_THE_ENVIRONMENT='yes there is'
 export SOMETHING_IN_THE_ENVIRONMENT
-export PATH=/some/path/that/does/not/exist:${PATH}
+PATH=/some/path/that/does/not/exist:${PATH}
+export PATH
 
 ${SBCL:-sbcl} <<EOF
   ;; test that $PATH is searched
@@ -56,6 +57,13 @@ ${SBCL:-sbcl} <<EOF
   ;; That's not just because POSIX-ENVIRON is having a bad hair
   ;; day and returning NIL, is it?
   (assert (plusp (length (sb-ext:posix-environ))))
+  ;; make sure that a stream input argument is basically reasonable.
+  (let ((string (let ((i (make-string-input-stream "abcdef")))
+                  (with-output-to-string (stream)
+                    (sb-ext:run-program "/bin/cat" ()
+                                        :input i :output stream)))))
+    (assert (= (length string) 6))
+    (assert (string= string "abcdef")))
   ;; success convention for this Lisp program run as part of a larger script
   (sb-ext:quit :unix-status 52)))
 EOF