Clojure test
This commit is contained in:
parent
36abd4152a
commit
6087b94d32
1 changed files with 10 additions and 4 deletions
|
|
@ -38,10 +38,16 @@
|
||||||
(is (= 6 (bb "foo"))))
|
(is (= 6 (bb "foo"))))
|
||||||
(let [tmp-dir (fs/create-temp-dir)
|
(let [tmp-dir (fs/create-temp-dir)
|
||||||
out (str (fs/file tmp-dir "out.txt"))]
|
out (str (fs/file tmp-dir "out.txt"))]
|
||||||
(test-utils/with-config {:tasks {'foo (list 'shell {:out out}
|
(testing "shell test"
|
||||||
"echo hello")}}
|
(test-utils/with-config {:tasks {'foo (list 'shell {:out out}
|
||||||
(bb "foo")
|
"echo hello")}}
|
||||||
(is (= "hello\n" (slurp out))))
|
(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")
|
(test-utils/with-config {:tasks {'quux (list 'spit out "quux\n")
|
||||||
'baz (list 'spit out "baz\n" :append true)
|
'baz (list 'spit out "baz\n" :append true)
|
||||||
'bar {:depends ['baz]
|
'bar {:depends ['baz]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue