Skip to content

Commit 453a7ba

Browse files
committed
Additional test coverage for alignment of commented code.
1 parent 81b0112 commit 453a7ba

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

test/clojure-mode-indentation-test.el

+19-1
Original file line numberDiff line numberDiff line change
@@ -772,6 +772,24 @@ x
772772
#?@(:clj [2]
773773
:cljs [2])")
774774

775+
(when-aligning-it "should handle sexps broken up by line comments"
776+
"
777+
(let [x 1
778+
;; comment
779+
xx 1]
780+
xx)"
781+
782+
"
783+
{:x 1
784+
;; comment
785+
:xxx 2}"
786+
787+
"
788+
(case x
789+
:aa 1
790+
;; comment
791+
:a 2)")
792+
775793
(when-aligning-it "should work correctly when margin comments appear after nested, multi-line, non-terminal sexps"
776794
"
777795
(let [x {:a 1
@@ -781,7 +799,7 @@ x
781799

782800
"
783801
{:aa {:b 1
784-
:cc 2} ; comment
802+
:cc 2} ;; comment
785803
:a 1}}"
786804

787805
"

0 commit comments

Comments
 (0)