Fix tests

This commit is contained in:
Michiel Borkent 2021-04-25 23:28:53 +02:00
parent 6da8fc99b8
commit c8c49f42fe

View file

@ -51,6 +51,7 @@
"echo hello")}} "echo hello")}}
(bb "foo") (bb "foo")
(is (= "hello\n" (slurp out))))) (is (= "hello\n" (slurp out)))))
(fs/delete out)
(testing "shell test with :continue" (testing "shell test with :continue"
(test-utils/with-config {:tasks {'foo (list 'shell {:out out (test-utils/with-config {:tasks {'foo (list 'shell {:out out
:err out :err out
@ -59,15 +60,15 @@
(bb "foo") (bb "foo")
(is (str/includes? (slurp out) (is (str/includes? (slurp out)
"foobar")))) "foobar"))))
(fs/delete out)
(testing "shell test with :continue fn" (testing "shell test with :continue fn"
(test-utils/with-config {:tasks {'foo (list 'shell {:out out (test-utils/with-config {:tasks {'foo (list '-> (list 'shell {:out out
:err out :err out
:continue '(fn [proc] :continue '(fn [proc]
(contains? proc :exit))} (contains? proc :exit))}
"ls foobar")}} "ls foobar")
(bb "foo") :exit)}}
(is (str/includes? (slurp out) (is (= 1 (bb "run" "--prn" "foo")))))
"foobar"))))
(fs/delete out) (fs/delete out)
(testing "clojure test" (testing "clojure test"
(test-utils/with-config {:tasks {'foo (list 'clojure {:out out} (test-utils/with-config {:tasks {'foo (list 'clojure {:out out}