Add clojure task
This commit is contained in:
parent
ed40991c56
commit
a1bf6692d0
2 changed files with 12 additions and 0 deletions
|
|
@ -622,6 +622,8 @@ Use -- to separate script command line args from bb command line args.
|
|||
(let [main-arg (first args)
|
||||
cmd-line-args (rest args)]
|
||||
(parse-opts (seq (map str (concat ["--main" main-arg] cmd-line-args command-line-args)))))
|
||||
clojure
|
||||
(parse-opts (seq (map str (concat ["--clojure"] args command-line-args))))
|
||||
do
|
||||
{:do (map #(resolve-task tasks % nil) args)}
|
||||
;; default
|
||||
|
|
|
|||
|
|
@ -164,3 +164,13 @@ Addition is a pretty advanced topic. Let us start with the identity element
|
|||
(is (fs/exists? temp-file))
|
||||
(bb :hello)
|
||||
(is (not (fs/exists? temp-file))))))
|
||||
|
||||
(deftest clojure-test
|
||||
(let [temp-dir (fs/create-temp-dir)
|
||||
temp-file (fs/create-file (fs/path temp-dir "temp-file.txt"))]
|
||||
(with-config {:tasks {:jvm ['clojure "-M" "-e"
|
||||
(format "(do (require '[clojure.java.io :as io])
|
||||
(.delete (io/file \"%s\")))" (str temp-file))]}}
|
||||
(is (fs/exists? temp-file))
|
||||
(bb :jvm)
|
||||
(is (not (fs/exists? temp-file))))))
|
||||
|
|
|
|||
Loading…
Reference in a new issue