Skip to content

Commit ec6a97c

Browse files
committed
Add test for lines with trailing whitespace.
Trailing whitespace should not interfere with normal indentation algorithm.
1 parent 0ed9cf1 commit ec6a97c

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

test/elixir-mode-indentation-tests.el

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,3 +514,24 @@ end"
514514
def foo do #comment
515515
:bar
516516
end")
517+
518+
(elixir-def-indentation-test indent-after-require-Record
519+
()
520+
;; Mind the significant whitespace after `Record' in each case. There should
521+
;; be two spaces after `Record', otherwise this test is meaningless.
522+
"
523+
defmodule RSS do
524+
require Record
525+
526+
def zip(list1, list2) when length(list1) == length(list2) do
527+
x = 1
528+
end
529+
end"
530+
"
531+
defmodule RSS do
532+
require Record
533+
534+
def zip(list1, list2) when length(list1) == length(list2) do
535+
x = 1
536+
end
537+
end")

0 commit comments

Comments
 (0)