Skip to content

Commit 22a7e73

Browse files
committed
Merge pull request #1016 from vwyu/test-case-expression
Add test for a case expression with multiple paths on their own lines.
2 parents 7933ca9 + f724b92 commit 22a7e73

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/haskell-indentation-tests.el

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -850,6 +850,17 @@ function =
850850
"
851851
((84 0) 4))
852852

853+
(hindent-test "46* case expression with paths on their own lines" "
854+
fact n =
855+
case n of
856+
0 -> 1
857+
_ -> n * fact (n - 1)
858+
"
859+
((1 0) 0)
860+
((2 0) 2)
861+
((3 0) 4)
862+
((4 0) 4)
863+
((5 0) 0 2 4 18))
853864

854865
(ert-deftest haskell-indentation-ret-indents ()
855866
(switch-to-buffer (get-buffer-create "source.hs"))

0 commit comments

Comments
 (0)