diff --git a/src/babashka/main.clj b/src/babashka/main.clj index 36100197..b86c2f3f 100644 --- a/src/babashka/main.clj +++ b/src/babashka/main.clj @@ -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]))) diff --git a/test/babashka/bb_edn_test.clj b/test/babashka/bb_edn_test.clj index 8b509835..516add63 100644 --- a/test/babashka/bb_edn_test.clj +++ b/test/babashka/bb_edn_test.clj @@ -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}} diff --git a/test/babashka/main_test.clj b/test/babashka/main_test.clj index bc64c473..4fb329b3 100644 --- a/test/babashka/main_test.clj +++ b/test/babashka/main_test.clj @@ -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