From fce39548d0d363feb2043c1bf6fae5d2c4c4bbed Mon Sep 17 00:00:00 2001 From: Sean Corfield Date: Sun, 15 Dec 2024 16:02:28 -0800 Subject: [PATCH] fix mixed arg test for Clojure 1.12 Signed-off-by: Sean Corfield --- test/honey/sql_test.cljc | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/test/honey/sql_test.cljc b/test/honey/sql_test.cljc index 8e697eb..eca34ab 100644 --- a/test/honey/sql_test.cljc +++ b/test/honey/sql_test.cljc @@ -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]