Commit 0e0b1f88 authored by Robert Goldman's avatar Robert Goldman
Browse files

Merge branch 'ecl-launch-program-streams' into 'master'

LAUNCH-PROGRAM: ECL 20.4.24 no longer requires streams to be files or synonyms

See merge request asdf/asdf!145
parents 966e93ea b7e05c52
......@@ -399,6 +399,31 @@
;; (equal error-output-string error-output-line))
))
(define-test
":input <file> :output <sstream> :wait nil"
(let ((in-string (format nil "A line.~%And another.~%")))
(create-file-from-string *input-file* in-string)
(with-output-to-string (out-stream)
(let* ((process (launch-program "cat" :input *input-file*
:output out-stream)))
(wait-process process)
(check-strings in-string (get-output-stream-string out-stream))
(close-streams process)))))
;; This test hangs indefinitely on ECL 20.4.24. Reported upstream with potential
;; fix at https://gitlab.com/embeddable-common-lisp/ecl/-/merge_requests/219
#-ecl
(define-test
":input <sstream> :output <sstream> :wait nil"
(let ((in-string (format nil "A line.~%And another.~%")))
(with-output-to-string (out-stream)
(with-input-from-string (in-stream in-string)
(let* ((process (launch-program "tee /tmp/asdf-test.txt" :input in-stream
:output out-stream)))
(wait-process process)
(check-strings in-string (get-output-stream-string out-stream))
(close-streams process))))))
(defvar *dynamic-input*)
(define-test
......
......@@ -525,10 +525,11 @@ LAUNCH-PROGRAM returns a PROCESS-INFO object."
(parameter-error "~S: The only admissible value for ~S is ~S on this lisp"
'launch-program :error-output :interactive))
#+ecl
(when (some #'(lambda (stream)
(when (and (version< (lisp-implementation-version) "20.4.24")
(some #'(lambda (stream)
(and (streamp stream)
(not (file-or-synonym-stream-p stream))))
(list input output error-output))
(list input output error-output)))
(parameter-error "~S: Streams passed as I/O parameters need to be (synonymous with) file streams on this lisp"
'launch-program))
#+(or abcl allegro clozure cmucl ecl (and lispworks os-unix) mkcl sbcl scl)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment