Skip to content

Commit 745cbcb

Browse files
committed
Add several tests for various indentation scenarios.
1 parent 7de3f87 commit 745cbcb

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

test/elixir-mode-indentation-tests.el

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,3 +462,44 @@ defmodule Foo do
462462
end
463463
end
464464
")
465+
466+
(elixir-def-indentation-test indent-pipes
467+
(:expected-result :failed)
468+
"def foo(x) do
469+
a = x
470+
|> Enum.reverse
471+
end"
472+
"def foo(x) do
473+
a = x
474+
|> Enum.reverse
475+
end")
476+
477+
(elixir-def-indentation-test indent-inside-parens
478+
(:expected-result :failed)
479+
"x = do_something(
480+
:foo,
481+
:bar
482+
)"
483+
"x = do_something(
484+
:foo,
485+
:bar
486+
)")
487+
488+
(elixir-def-indentation-test indent-inside-parens/2 ()
489+
"
490+
x = do_something(:foo,
491+
:bar)"
492+
"
493+
x = do_something(:foo,
494+
:bar)")
495+
496+
(elixir-def-indentation-test indent-inside-parens/3
497+
(:expected-result :failed)
498+
"
499+
x = do_something(:foo, fn (arg) ->
500+
do_another(arg)
501+
end)"
502+
"
503+
x = do_something(:foo, fn (arg) ->
504+
do_another(arg)
505+
end)")

0 commit comments

Comments
 (0)