Skip to content

Commit 21e229b

Browse files
committed
Add indentation tests for condp and namespace-qualified special forms
Test condp (spec 2, two special args before body) and verify that namespace-qualified versions of special forms (clojure.core/let, clojure.core/when, clojure.core/defn) indent correctly via the backtracking mechanism.
1 parent 6e773a2 commit 21e229b

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

test/clojure-mode-indentation-test.el

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,27 @@ DESCRIPTION is a string with the description of the spec."
585585
(with-custom-thing [x y]
586586
(body x y))")
587587

588+
(when-indenting-it "should handle condp"
589+
"
590+
(condp = x
591+
1 \"one\"
592+
2 \"two\"
593+
\"other\")")
594+
595+
(when-indenting-it "should handle namespace-qualified special forms"
596+
"
597+
(clojure.core/let [x 1]
598+
(inc x))"
599+
600+
"
601+
(clojure.core/when true
602+
(do-stuff))"
603+
604+
"
605+
(clojure.core/defn foo
606+
[x]
607+
(inc x))")
608+
588609
(when-indenting-it "should indent unknown def forms like body"
589610
"
590611
(defwhatever my-thing

0 commit comments

Comments
 (0)