From 7e78b10ae492f4a511edca62cb5ca376b5ce2c53 Mon Sep 17 00:00:00 2001 From: Jon Doane Date: Sun, 11 Oct 2015 11:29:55 -0400 Subject: [PATCH] Added simple test to check for preserved dashes when the var is bound to true. --- test/honeysql/format_test.clj | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/honeysql/format_test.clj b/test/honeysql/format_test.clj index 26f90bc..f35db3f 100644 --- a/test/honeysql/format_test.clj +++ b/test/honeysql/format_test.clj @@ -18,6 +18,11 @@ :foo-bar "foo_bar") (is (= (quote-identifier "*" :style :ansi) "*"))) +(deftest test-dashed-quote + (binding [*allow-dashed-names?* true] + (is (= (quote-identifier :foo-bar) "foo-bar")) + (is (= (quote-identifier :foo-bar :style :ansi) "\"foo-bar\"")))) + (deftest test-cte (is (= (format-clause (first {:with [[:query {:select [:foo] :from [:bar]}]]}) nil)