Fix test
This commit is contained in:
parent
86d4a7319f
commit
3c6cf3f37e
1 changed files with 10 additions and 9 deletions
|
|
@ -110,17 +110,18 @@
|
||||||
(is (= "The following tasks are available:\n\ntask1 task1 doc\ntask2 task2 doc\n" res)))))
|
(is (= "The following tasks are available:\n\ntask1 task1 doc\ntask2 task2 doc\n" res)))))
|
||||||
|
|
||||||
(deftest task-priority-test
|
(deftest task-priority-test
|
||||||
(testing "FILE > TASK > SUBCOMMAND"
|
(when-not test-utils/native?
|
||||||
(is (= "foo.jar" (:uberjar (main/parse-opts ["uberjar" "foo.jar"]))))
|
(testing "FILE > TASK > SUBCOMMAND"
|
||||||
(test-utils/with-config '{:tasks {uberjar (+ 1 2 3)}}
|
(is (= "foo.jar" (:uberjar (main/parse-opts ["uberjar" "foo.jar"]))))
|
||||||
(vreset! common/bb-edn (edn/read-string (slurp test-utils/*bb-edn-path*)))
|
|
||||||
(is (= "uberjar" (:run (main/parse-opts ["uberjar"])))))
|
|
||||||
(try
|
|
||||||
(test-utils/with-config '{:tasks {uberjar (+ 1 2 3)}}
|
(test-utils/with-config '{:tasks {uberjar (+ 1 2 3)}}
|
||||||
(spit "uberjar" "#!/usr/bin/env bb\n(+ 1 2 3)")
|
|
||||||
(vreset! common/bb-edn (edn/read-string (slurp test-utils/*bb-edn-path*)))
|
(vreset! common/bb-edn (edn/read-string (slurp test-utils/*bb-edn-path*)))
|
||||||
(is (= "uberjar" (:file (main/parse-opts ["uberjar"])))))
|
(is (= "uberjar" (:run (main/parse-opts ["uberjar"])))))
|
||||||
(finally (fs/delete "uberjar")))))
|
(try
|
||||||
|
(test-utils/with-config '{:tasks {uberjar (+ 1 2 3)}}
|
||||||
|
(spit "uberjar" "#!/usr/bin/env bb\n(+ 1 2 3)")
|
||||||
|
(vreset! common/bb-edn (edn/read-string (slurp test-utils/*bb-edn-path*)))
|
||||||
|
(is (= "uberjar" (:file (main/parse-opts ["uberjar"])))))
|
||||||
|
(finally (fs/delete "uberjar"))))))
|
||||||
|
|
||||||
;; TODO:
|
;; TODO:
|
||||||
;; Do we want to support the same parsing as the clj CLI?
|
;; Do we want to support the same parsing as the clj CLI?
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue