Enable pipe test

This commit is contained in:
Michiel Borkent 2020-04-29 11:04:23 +02:00
parent 00a4fd4855
commit 249abdb6ad

View file

@ -179,15 +179,17 @@
(is (true? (bb nil "(.exists (io/file \"README.md\"))"))) (is (true? (bb nil "(.exists (io/file \"README.md\"))")))
(is (true? (bb nil "(.canWrite (io/file \"README.md\"))")))) (is (true? (bb nil "(.canWrite (io/file \"README.md\"))"))))
#_(deftest pipe-test (deftest pipe-test
(when test-utils/native? (when (and test-utils/native?
(not main/windows?))
(let [out (:out (sh "bash" "-c" "./bb -o '(range)' | (let [out (:out (sh "bash" "-c" "./bb -o '(range)' |
./bb --stream '(* *input* *input*)' | ./bb --stream '(* *input* *input*)' |
head -n10")) head -n10"))
out (str/split-lines out) out (str/split-lines out)
out (map edn/read-string out)] out (map edn/read-string out)]
(is (= (take 10 (map #(* % %) (range))) out)))) (is (= (take 10 (map #(* % %) (range))) out))))
(when test-utils/native? (when (and test-utils/native?
(not main/windows?))
(let [out (:out (sh "bash" "-c" "./bb -O '(repeat \"dude\")' | (let [out (:out (sh "bash" "-c" "./bb -O '(repeat \"dude\")' |
./bb --stream '(str *input* \"rino\")' | ./bb --stream '(str *input* \"rino\")' |
./bb -I '(take 3 *input*)'")) ./bb -I '(take 3 *input*)'"))