From 6087b94d32579e234edbe2b5933aff5fddb64f2f Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Sat, 10 Apr 2021 16:12:30 +0200 Subject: [PATCH] Clojure test --- test/babashka/bb_edn_test.clj | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/test/babashka/bb_edn_test.clj b/test/babashka/bb_edn_test.clj index 6affb2b1..14abe403 100644 --- a/test/babashka/bb_edn_test.clj +++ b/test/babashka/bb_edn_test.clj @@ -38,10 +38,16 @@ (is (= 6 (bb "foo")))) (let [tmp-dir (fs/create-temp-dir) out (str (fs/file tmp-dir "out.txt"))] - (test-utils/with-config {:tasks {'foo (list 'shell {:out out} - "echo hello")}} - (bb "foo") - (is (= "hello\n" (slurp out)))) + (testing "shell test" + (test-utils/with-config {:tasks {'foo (list 'shell {:out out} + "echo hello")}} + (bb "foo") + (is (= "hello\n" (slurp out))))) + (testing "clojure test" + (test-utils/with-config {:tasks {'foo (list 'clojure {:out out} + "-M -e" "(println :yolo)")}} + (bb "foo") + (is (= ":yolo\n" (slurp out))))) (test-utils/with-config {:tasks {'quux (list 'spit out "quux\n") 'baz (list 'spit out "baz\n" :append true) 'bar {:depends ['baz]