This commit is contained in:
Michiel Borkent 2021-05-03 11:06:32 +02:00
parent cf570cd913
commit e0e3aa422e
3 changed files with 20 additions and 13 deletions

View file

@ -577,7 +577,9 @@ When no eval opts or subcommand is provided, the implicit subcommand is repl.")
(if options
(case (first 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])))

View file

@ -20,18 +20,6 @@
:eof nil}
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
(test-utils/with-config '{:deps {medley/medley {:mvn/version "1.3.0"}}}
(is (= '{1 {:id 1}, 2 {:id 2}}

View file

@ -622,6 +622,23 @@ true")))
(is (= 0.33333333333333333333M (bb nil "(with-precision 20 (/ 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
(comment