From c8c49f42fe31b7c440934662a03501669cb89afd Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Sun, 25 Apr 2021 23:28:53 +0200 Subject: [PATCH] Fix tests --- test/babashka/bb_edn_test.clj | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/test/babashka/bb_edn_test.clj b/test/babashka/bb_edn_test.clj index 412a9615..249968a9 100644 --- a/test/babashka/bb_edn_test.clj +++ b/test/babashka/bb_edn_test.clj @@ -51,6 +51,7 @@ "echo hello")}} (bb "foo") (is (= "hello\n" (slurp out))))) + (fs/delete out) (testing "shell test with :continue" (test-utils/with-config {:tasks {'foo (list 'shell {:out out :err out @@ -59,15 +60,15 @@ (bb "foo") (is (str/includes? (slurp out) "foobar")))) + (fs/delete out) (testing "shell test with :continue fn" - (test-utils/with-config {:tasks {'foo (list 'shell {:out out - :err out - :continue '(fn [proc] - (contains? proc :exit))} - "ls foobar")}} - (bb "foo") - (is (str/includes? (slurp out) - "foobar")))) + (test-utils/with-config {:tasks {'foo (list '-> (list 'shell {:out out + :err out + :continue '(fn [proc] + (contains? proc :exit))} + "ls foobar") + :exit)}} + (is (= 1 (bb "run" "--prn" "foo"))))) (fs/delete out) (testing "clojure test" (test-utils/with-config {:tasks {'foo (list 'clojure {:out out}