Skip to content

Commit 02c76da

Browse files
author
José Valim
committed
Add a test for multiple vars in IEx for the previous commit
1 parent 4355972 commit 02c76da

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/iex/test/iex/interaction_test.exs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,15 @@ defmodule IEx.InteractionTest do
2121
assert capture_iex("1 + 2") == "3"
2222
end
2323

24+
test "multiple vars" do
25+
code = """
26+
<< a, b, c, d, e, f, g, h, i, j :: binary >> = <<1, 2, 3, 4, 5, 6, 7, 8, 9, 10>>
27+
<< a, b, c, d, e, f, g, h, i, x :: binary >> = <<1, 2, 3, 4, 5, 6, 7, 8, 9, 10>>
28+
x
29+
"""
30+
assert capture_iex(code) =~ "10"
31+
end
32+
2433
test "exception" do
2534
exception = Regex.escape("** (ArithmeticError) bad argument in arithmetic expression")
2635
assert capture_iex("1 + :atom\n:this_is_still_working")

0 commit comments

Comments
 (0)