tests: fix test for non-thread builds

This commit is contained in:
Daniel Kochmanski 2017-10-09 09:47:50 +02:00
parent b00b15b078
commit e329d5bb49

View file

@ -122,8 +122,7 @@
(is-eql :resumed (ext:external-process-wait process nil))
(finishes (ext:terminate-process process t))))))
;;; This test is disabled because we don't support virtual streams in
;;; run-program yet.
#+threads
(test no-fd-streams
(with-output-to-string (output-stream)
(with-output-to-string (error-stream)
@ -137,6 +136,24 @@
(is (null (zerop (length (get-output-stream-string error-stream)))))
(mapc #'close (list output-stream error-stream)))))
#-threads
(test no-fd-streams
(with-output-to-string (output-stream)
(with-output-to-string (error-stream)
;; note the space otherwise reader waits for next character
(with-input-from-string (input-stream "42 ")
(ext:run-program *binary* `("--norc"
"--load" ,*program*
"--eval" ,(format nil "(~a)" 'io/err)
"--eval" "(quit)")
:input input-stream
:output output-stream
:error error-stream
:wait t))
(is (null (zerop (length (get-output-stream-string output-stream)))))
(is (null (zerop (length (get-output-stream-string error-stream)))))
(mapc #'close (list output-stream error-stream)))))
#-windows
(test process-environ
(is (read-line (ext:run-program "env" nil) nil nil))