Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dbaa1c3

Browse files
committed
Added a failing (for now) unit test
- Indentation seems to fail if a single-line function declaration comes after a single-line function declaration that contain a when-clause.
1 parent 338f198 commit dbaa1c3

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/elixir-mode-indentation-test.el

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -941,6 +941,18 @@ end"
941941
end
942942
end")
943943

944+
(elixir-def-indentation-test indent-after-def-do-online/3
945+
(:expected-result :failed :tags '(indentation))
946+
"defmodule Foo do
947+
def bar(baz, quun \\\\ nil)
948+
def bar(baz, quun) when baz == quun, do: baz
949+
def bar(baz, quun), do: quun
950+
end"
951+
"defmodule Foo do
952+
def bar(baz, quun \\\\ nil)
953+
def bar(baz, quun) when baz == quun, do: baz
954+
def bar(baz, quun), do: quun
955+
end")
944956

945957
(elixir-def-indentation-test indent-after-not-finished-one-line-def
946958
(:tags '(indentation))

0 commit comments

Comments
 (0)