diff --git a/test/test-run-program.script b/test/test-run-program.script index 55c76895b3b7742512c35318363b640ff38bc218..4433b1664a6ef604a1052d91dbd29b735b9b3dcf 100644 --- a/test/test-run-program.script +++ b/test/test-run-program.script @@ -74,6 +74,9 @@ (assert-equal '(:ok 1) (run-program '("echo" ":ok 1") :output :forms)) (assert-equal (format nil "ok 1~%") (remove-cr (run-program '("echo" "ok 1") :output :string))) +(assert-equal (format nil "ok~%") + (remove-cr (with-output-to-string (*standard-output*) + (run-program "echo ok" :output t :error-output :output)))) ;;#+allegro (trace excl:run-shell-command sys:reap-os-subprocess) ;;#+lispworks (trace system:run-shell-command system:pid-exit-status) diff --git a/uiop/run-program.lisp b/uiop/run-program.lisp index b75ed11f7718a716b43006444ff5ae025eaf4fbe..6709b7a9db96b4b6423ec0772334568bb40310fd 100644 --- a/uiop/run-program.lisp +++ b/uiop/run-program.lisp @@ -370,7 +370,7 @@ for the implementation's underlying run-program function" via SLURP-INPUT-STREAM or VOMIT-OUTPUT-STREAM (return T), or whether it's already taken care of by the implementation's underlying run-program." (not (typep specifier '(or null string pathname (member :interactive :output) - #+(or cmu sbcl scl) stream + #+(or cmu sbcl scl) (or stream (eql t)) #+lispworks file-stream)))) ;; not a type!? comm:socket-stream (defun %normalize-io-specifier (specifier &optional role)