[#770] Add test
This commit is contained in:
parent
cf570cd913
commit
e0e3aa422e
3 changed files with 20 additions and 13 deletions
|
|
@ -577,7 +577,9 @@ When no eval opts or subcommand is provided, the implicit subcommand is repl.")
|
||||||
(if options
|
(if options
|
||||||
(case (first options)
|
(case (first options)
|
||||||
("--classpath" "-cp") (recur (nnext options) (assoc opts-map :classpath (second options)))
|
("--classpath" "-cp") (recur (nnext options) (assoc opts-map :classpath (second options)))
|
||||||
("--debug") (recur (next options) (assoc opts-map :debug true))
|
("--debug"
|
||||||
|
"--verbose" ;; renamed to --debug
|
||||||
|
) (recur (next options) (assoc opts-map :debug true))
|
||||||
[options opts-map])
|
[options opts-map])
|
||||||
[options opts-map])))
|
[options opts-map])))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,18 +20,6 @@
|
||||||
:eof nil}
|
:eof nil}
|
||||||
ret)))
|
ret)))
|
||||||
|
|
||||||
(deftest doc-test
|
|
||||||
(test-utils/with-config {:paths ["test-resources/task_scripts"]}
|
|
||||||
(is (str/includes? (apply test-utils/bb nil
|
|
||||||
(map str ["doc" "tasks"]))
|
|
||||||
"This is task ns docstring."))
|
|
||||||
(is (str/includes? (apply test-utils/bb nil
|
|
||||||
(map str ["doc" "tasks/foo"]))
|
|
||||||
"Foo docstring"))
|
|
||||||
(is (str/includes? (apply test-utils/bb nil
|
|
||||||
(map str ["doc" "tasks/-main"]))
|
|
||||||
"Main docstring"))))
|
|
||||||
|
|
||||||
(deftest deps-test
|
(deftest deps-test
|
||||||
(test-utils/with-config '{:deps {medley/medley {:mvn/version "1.3.0"}}}
|
(test-utils/with-config '{:deps {medley/medley {:mvn/version "1.3.0"}}}
|
||||||
(is (= '{1 {:id 1}, 2 {:id 2}}
|
(is (= '{1 {:id 1}, 2 {:id 2}}
|
||||||
|
|
|
||||||
|
|
@ -622,6 +622,23 @@ true")))
|
||||||
(is (= 0.33333333333333333333M (bb nil "(with-precision 20 (/ 1M 3))")))
|
(is (= 0.33333333333333333333M (bb nil "(with-precision 20 (/ 1M 3))")))
|
||||||
(is (= 0.33333333333333333334M (bb nil "(with-precision 20 :rounding CEILING (/ 1M 3))"))))
|
(is (= 0.33333333333333333334M (bb nil "(with-precision 20 :rounding CEILING (/ 1M 3))"))))
|
||||||
|
|
||||||
|
(deftest doc-test
|
||||||
|
(test-utils/with-config {:paths ["test-resources/task_scripts"]}
|
||||||
|
(is (str/includes? (apply test-utils/bb nil
|
||||||
|
(map str ["doc" "tasks"]))
|
||||||
|
"This is task ns docstring."))
|
||||||
|
(is (str/includes? (apply test-utils/bb nil
|
||||||
|
(map str ["doc" "tasks/foo"]))
|
||||||
|
"Foo docstring"))
|
||||||
|
(is (str/includes? (apply test-utils/bb nil
|
||||||
|
(map str ["doc" "tasks/-main"]))
|
||||||
|
"Main docstring"))
|
||||||
|
(is (str/includes? (apply test-utils/bb nil
|
||||||
|
(map str ["doc" "with-precision"]))
|
||||||
|
"precision"))
|
||||||
|
(is (str/blank? (with-out-str (main/main "doc" "non-existing"))))
|
||||||
|
(is (= 1 (main/main "doc" "non-existing")))))
|
||||||
|
|
||||||
;;;; Scratch
|
;;;; Scratch
|
||||||
|
|
||||||
(comment
|
(comment
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue