Skip to content

Commit 41d2412

Browse files
committed
test for binary sequence inside matches
1 parent 377b223 commit 41d2412

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

test/elixir-mode-indentation-test.el

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -868,6 +868,52 @@ defmodule ExampleTest do
868868
end
869869
end")
870870

871+
(elixir-def-indentation-test indent-binary-sequence-inside-match-block/2
872+
(:expected-result :failed :tags '(indentation))
873+
"
874+
case asd do
875+
<<c1::5, c2::5, c3::5, c4::5, c5::5, c6::5, c7::2>> ->
876+
<<main::binary,
877+
enc.(c1)::8, enc.(c2)::8, enc.(c3)::8, enc.(c4)::8,
878+
enc.(c5)::8, enc.(c6)::8, enc.(bsl(c7, 3))::8, ?=>>
879+
<<c1::5, c2::5, c3::5, c4::5, c5::4>> ->
880+
<<main::binary,
881+
enc.(c1)::8, enc.(c2)::8, enc.(c3)::8, enc.(c4)::8,
882+
enc.(bsl(c5, 1))::8, ?=, ?=, ?=>>
883+
<<c1::5, c2::5, c3::5, c4::1>> ->
884+
<<main::binary,
885+
enc.(c1)::8, enc.(c2)::8, enc.(c3)::8, enc.(bsl(c4, 4))::8,
886+
?=, ?=, ?=, ?=>>
887+
<<c1::5, c2::3>> ->
888+
<<main::binary,
889+
enc.(c1)::8, enc.(bsl(c2, 2))::8, ?=, ?=,
890+
?=, ?=, ?=, ?=>>
891+
<<>> ->
892+
main
893+
end"
894+
895+
"
896+
case asd do
897+
<<c1::5, c2::5, c3::5, c4::5, c5::5, c6::5, c7::2>> ->
898+
<<main::binary,
899+
enc.(c1)::8, enc.(c2)::8, enc.(c3)::8, enc.(c4)::8,
900+
enc.(c5)::8, enc.(c6)::8, enc.(bsl(c7, 3))::8, ?=>>
901+
<<c1::5, c2::5, c3::5, c4::5, c5::4>> ->
902+
<<main::binary,
903+
enc.(c1)::8, enc.(c2)::8, enc.(c3)::8, enc.(c4)::8,
904+
enc.(bsl(c5, 1))::8, ?=, ?=, ?=>>
905+
<<c1::5, c2::5, c3::5, c4::1>> ->
906+
<<main::binary,
907+
enc.(c1)::8, enc.(c2)::8, enc.(c3)::8, enc.(bsl(c4, 4))::8,
908+
?=, ?=, ?=, ?=>>
909+
<<c1::5, c2::3>> ->
910+
<<main::binary,
911+
enc.(c1)::8, enc.(bsl(c2, 2))::8, ?=, ?=,
912+
?=, ?=, ?=, ?=>>
913+
<<>> ->
914+
main
915+
end")
916+
871917

872918
;; We don't want automatic whitespace cleanup here because of the significant
873919
;; whitespace after `Record' above. By setting `whitespace-action' to nil,

0 commit comments

Comments
 (0)