Skip to content

Commit

Permalink
fix mixed arg test for Clojure 1.12
Browse files Browse the repository at this point in the history
Signed-off-by: Sean Corfield <[email protected]>
  • Loading branch information
seancorfield committed Dec 16, 2024
1 parent 0f26e7d commit fce3954
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions test/honey/sql_test.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -556,13 +556,15 @@
(-> {:delete-from :foo
:where [:= :foo.id 42]}
(format :dialect :mysql :pretty true)))))
(when (str/starts-with? #?(:cljs *clojurescript-version*
:default (clojure-version)) "1.11")
(testing "format can be called with mixed arguments"
(is (= ["\nDELETE FROM `foo`\nWHERE `foo`.`id` = ?\n" 42]
(-> {:delete-from :foo
:where [:= :foo.id 42]}
(format :dialect :mysql {:pretty true})))))))
(let [version #?(:cljs *clojurescript-version*
:default (clojure-version))]
(when (or (str/starts-with? version "1.12")
(str/starts-with? version "1.11"))
(testing "format can be called with mixed arguments"
(is (= ["\nDELETE FROM `foo`\nWHERE `foo`.`id` = ?\n" 42]
(-> {:delete-from :foo
:where [:= :foo.id 42]}
(format :dialect :mysql {:pretty true}))))))))

(deftest delete-from-test
(is (= ["DELETE FROM `foo` WHERE `foo`.`id` = ?" 42]
Expand Down

0 comments on commit fce3954

Please sign in to comment.