1.0.29.8: :PTY and stream arguments in RUN-PROGRAM
[sbcl.git] / tests / run-program.impure.lisp
index 9ef07e5..01100ba 100644 (file)
               (sb-ext:run-program "/bin/echo" '
                                   ("It would be nice if this didn't crash.")
                                   :wait nil :output nil)))))
+
+(with-test (:name (:run-program :pty-stream))
+  (assert (equal "OK"
+                 (subseq
+                  (with-output-to-string (s)
+                    (assert (= 42 (process-exit-code
+                                   (run-program "/bin/sh" '("-c" "echo OK; exit 42") :wait t
+                                                :pty s))))
+                    s)
+                  0
+                  2))))