Skip to content

Commit 7509468

Browse files
committed
Add more tests for simple-indent.
1 parent ec0e327 commit 7509468

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

tests/haskell-simple-indent-tests.el

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,16 @@
5353
(find-indent-positions '("a b c d e f g h"
5454
" long_streak")))))
5555

56+
(ert-deftest find-indent-positions-5 ()
57+
(should (equal '(2 4 6 13 15 17 19 24 32 40)
58+
(find-indent-positions '(" f g e e iirelevant"
59+
"a b c d"
60+
" h idden"
61+
" hidden"
62+
""
63+
" e f g h"
64+
"")))))
65+
5666
(ert-deftest find-indent-and-backtab-positions-1 ()
5767
(should (equal '((2 4 5 8 16 24 32 40 48 56)
5868
(2 4 5 8 16 24 32 40 48 56))
@@ -82,3 +92,28 @@
8292
(should (equal '((8 10 13 20 24 27 32 35 37 45)
8393
(8 10 13 20 24 27 32 35 37 45))
8494
(find-indent-and-backtab-positions '("\tx <- return 123 {- This is a comment -}")))))
95+
96+
(ert-deftest find-indent-and-backtab-positions-3 ()
97+
(should (equal '((2 4 6 13 15 17 19 24 32 40)
98+
(2 4 6 13 15 17 19 24 32 40))
99+
(find-indent-and-backtab-positions '(" f g e e iirelevant"
100+
"a b c d"
101+
" h idden x"
102+
" hidden 4 5"
103+
""
104+
" e f g h"
105+
"")
106+
(lambda ()
107+
(setq-local indent-tabs-mode nil))))))
108+
109+
(ert-deftest find-indent-and-backtab-positions-3a ()
110+
:expected-result :failed
111+
(should (equal '((2 4 6 13 15 17 19 24 32 40)
112+
(2 4 6 13 15 17 19 24 32 40))
113+
(find-indent-and-backtab-positions '(" f g e e iirelevant"
114+
"a b c d"
115+
" h idden x"
116+
" hidden 4 5"
117+
""
118+
" e f g h"
119+
"")))))

0 commit comments

Comments
 (0)