Add PipedInput/OutputStream (#1001)
This commit is contained in:
parent
943dc69c66
commit
a43e75ffd6
3 changed files with 13 additions and 2 deletions
2
sci
2
sci
|
|
@ -1 +1 @@
|
||||||
Subproject commit c09cff7206effebc05714b4fe6f67793736e7445
|
Subproject commit a7cdb456e8579d623fa8fb6a63faf476931cb11b
|
||||||
|
|
@ -107,6 +107,8 @@
|
||||||
java.io.FileReader
|
java.io.FileReader
|
||||||
java.io.InputStreamReader
|
java.io.InputStreamReader
|
||||||
java.io.OutputStreamWriter
|
java.io.OutputStreamWriter
|
||||||
|
java.io.PipedInputStream
|
||||||
|
java.io.PipedOutputStream
|
||||||
java.io.PrintStream
|
java.io.PrintStream
|
||||||
java.io.PrintWriter
|
java.io.PrintWriter
|
||||||
java.io.PushbackInputStream
|
java.io.PushbackInputStream
|
||||||
|
|
|
||||||
|
|
@ -743,6 +743,15 @@ true")))
|
||||||
(is (= "#abc 123\n"
|
(is (= "#abc 123\n"
|
||||||
(test-utils/normalize (test-utils/bb "{:a #abc 123}{:a #cde 789}" "-e" "(println (:a *input*))")))))))
|
(test-utils/normalize (test-utils/bb "{:a #abc 123}{:a #cde 789}" "-e" "(println (:a *input*))")))))))
|
||||||
|
|
||||||
|
(deftest piped-input-output-stream-test
|
||||||
|
(is (= 10 (bb nil "
|
||||||
|
(def po (java.io.PipedOutputStream.))
|
||||||
|
(def pi (java.io.PipedInputStream.))
|
||||||
|
(.connect pi po)
|
||||||
|
(.write po 10)
|
||||||
|
(.read pi)
|
||||||
|
"))))
|
||||||
|
|
||||||
;;;; Scratch
|
;;;; Scratch
|
||||||
|
|
||||||
(comment
|
(comment
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue