mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-23 13:01:42 -08:00
tests: fix test for non-thread builds
This commit is contained in:
parent
b00b15b078
commit
e329d5bb49
1 changed files with 19 additions and 2 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue