Skip to content

Commit 66be8ea

Browse files
committed
Add test cases for special case indentation
1 parent 8b45ef1 commit 66be8ea

File tree

3 files changed

+55
-0
lines changed

3 files changed

+55
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
(let [x (fn [y] 1)]
2+
(->> "ola"
3+
(x)))
4+
5+
(letfn [(x [y] 1)]
6+
(->> "ola"
7+
(x)))
8+
9+
10+
(->> "ola"
11+
(x))
12+
13+
(defn foo []
14+
(letfn [(x [y] 1)]
15+
(->> "ola"
16+
(x))))
17+
18+
(letfn [(twice [x]
19+
(* x 2))
20+
(six-times [y]
21+
(* (twice y) 3))]
22+
(println "Twice 15 =" (twice 15))
23+
(println "Six times 15 =" (six-times 15)))
24+
25+
;; vim:ft=clojure:
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
(let [x (fn [y] 1)]
2+
(->> "ola"
3+
(x)))
4+
5+
(letfn [(x [y] 1)]
6+
(->> "ola"
7+
(x)))
8+
9+
10+
(->> "ola"
11+
(x))
12+
13+
(defn foo []
14+
(letfn [(x [y] 1)]
15+
(->> "ola"
16+
(x))))
17+
18+
(letfn [(twice [x]
19+
(* x 2))
20+
(six-times [y]
21+
(* (twice y) 3))]
22+
(println "Twice 15 =" (twice 15))
23+
(println "Six times 15 =" (six-times 15)))
24+
25+
;; vim:ft=clojure:

clj/test/vim_clojure_static/indent_test.clj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,8 @@
3333
(test-indent "dispatch macro indentation is handled correctly"
3434
:in "test-dispatch-macro-indent.in"
3535
:out "test-dispatch-macro-indent.out"))
36+
37+
(deftest test-special-case-indent
38+
(test-indent "special case indentation is handled correctly"
39+
:in "test-special-case-indent.in"
40+
:out "test-special-case-indent.out"))

0 commit comments

Comments
 (0)