Skip to content

Commit 5eb14ed

Browse files
committed
Add test for indent for do inside a list
1 parent a0c6e49 commit 5eb14ed

File tree

1 file changed

+29
-2
lines changed

1 file changed

+29
-2
lines changed

tests/haskell-indentation-tests.el

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,7 @@ macro quotes them for you."
145145
function = Record
146146
{ field = 123 }"
147147
((1 0) 0)
148-
((2 0) 0 11)
149-
((3 0) 0 7))
148+
((2 0) 0 11))
150149

151150
(hindent-test "2 Handle underscore in identifiers""
152151
function = do
@@ -719,4 +718,32 @@ a = ( 1
719718
((2 0) 4)
720719
((2 2) 6))
721720

721+
(hindent-test "41 open do inside a list" "
722+
x = asum [ withX $ do
723+
return ()
724+
]
725+
"
726+
((2 0) 13))
727+
728+
(hindent-test "42 open do inside a list second element" "
729+
x = asum [ mzero
730+
, withX $ do
731+
return ()
732+
]
733+
"
734+
((3 0) 13))
735+
736+
(hindent-test "43 open do inside a list second element, reset alignment" "
737+
x = asum [ mzero
738+
, withX $ do
739+
return ()
740+
]
741+
"
742+
((3 0) 17))
743+
744+
(hindent-test "44 expression continues, reset alignment" "
745+
function = abc
746+
def
747+
xyz"
748+
((3 0) 0 7))
722749
;;; haskell-indentation-tests.el ends here

0 commit comments

Comments
 (0)