diff --git a/test/babashka/bb_edn_test.clj b/test/babashka/bb_edn_test.clj index 3e2142ef..67dd1244 100644 --- a/test/babashka/bb_edn_test.clj +++ b/test/babashka/bb_edn_test.clj @@ -303,6 +303,13 @@ (let [s (bb "run" "--prn" "a")] (is (str/includes? s "paths"))))))) +(deftest tasks:clojure-test + (testing "tokenization when called from tasks" + (test-utils/with-config + (pr-str '{:tasks {foo (-> (clojure {:out :string} "-J-Dfoo=\"{:port 5555 :accept clojure.core.server/repl}\" -M -e \"(clojure.edn/read-string (System/getProperty (name :foo)))\"") :out clojure.edn/read-string prn)}}) + (is (= '{:port 5555, :accept clojure.core.server/repl} + (bb "run" "foo")))))) + (deftest list-tasks-test (test-utils/with-config {} (let [res (test-utils/bb nil "tasks")] diff --git a/test/babashka/deps_test.clj b/test/babashka/deps_test.clj index 4253cd04..5b0169ea 100644 --- a/test/babashka/deps_test.clj +++ b/test/babashka/deps_test.clj @@ -103,10 +103,7 @@ true (bb (-> template (str/replace ":gitlibs" (pr-str (str libs-dir2))) (str/replace ":env-key" ":extra-env"))) (is (fs/exists? libs-dir)) - (is (fs/exists? libs-dir2))))) - (testing "tokenization when called from tasks" - (is (= '{:port 5555, :accept clojure.core.server/repl} - (bb (pr-str '(-> (babashka.tasks/clojure {:out :string} "-J-Dfoo=\"{:port 5555 :accept clojure.core.server/repl}\" -M -e \"(clojure.edn/read-string (System/getProperty (name :foo)))\"") :out edn/read-string))))))) + (is (fs/exists? libs-dir2)))))) (deftest ^:windows-only win-clojure-test (testing "GITLIBS can set location of .gitlibs dir"