summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksei Magusev <lexmag@me.com>2016-09-24 13:21:01 +0200
committerAleksei Magusev <lexmag@me.com>2016-09-25 01:44:20 +0200
commit25e51bb498701a8a23b6e2f9bb312139a7fcabb7 (patch)
treecdbfdc0e44779109a167f0f8628023760373a930
parent2d23f09430f9b9d8a2306ebd2a514bb7403b02b0 (diff)
downloadelixir-25e51bb498701a8a23b6e2f9bb312139a7fcabb7.tar.gz
Add extra test for string concatenation as match usage
This case has been fixed in 78c7ddc03f5c67b10bc81a4b30695d055f419661.
-rw-r--r--lib/elixir/test/elixir/kernel/binary_test.exs6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/elixir/test/elixir/kernel/binary_test.exs b/lib/elixir/test/elixir/kernel/binary_test.exs
index f10eea8b6..a1bcd45d7 100644
--- a/lib/elixir/test/elixir/kernel/binary_test.exs
+++ b/lib/elixir/test/elixir/kernel/binary_test.exs
@@ -67,6 +67,10 @@ bar \"""
<<x::binary-size(size)>> <> _ = "foobar"
assert x == "foo"
+ size = 16
+ <<x::size(size)>> <> _ = "foobar"
+ assert x == 26223
+
<<x::6*4-binary>> <> _ = "foobar"
assert x == "foo"
@@ -172,7 +176,7 @@ bar \"""
test "bitsyntax size shortcut" do
assert <<1::3>> == <<1::size(3)>>
- assert <<1::3 * 8>> == <<1::size(3)-unit(8)>>
+ assert <<1::3*8>> == <<1::size(3)-unit(8)>>
end
test "bitsyntax variable size" do