Skip to content

Commit e208237

Browse files
author
José Valim
committed
Merge pull request #1136 from alco/1131-tests
Add tests for %w(BigAtom)a mentioned in #1131
2 parents 3ec014f + c19e3d0 commit e208237

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/elixir/test/elixir/kernel/sigils_test.exs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ defmodule Kernel.SigilsTest do
6565

6666
bad_modifier = quote do: %w(foo bar baz)x
6767
assert ArgumentError[] = catch_error(Code.eval_quoted(bad_modifier))
68+
69+
assert %w(Foo Bar)a == [:"Foo", :"Bar"]
70+
assert %w(Foo.#{Bar}.Baz)a == [:"Foo.Elixir.Bar.Baz"]
71+
assert %w(Foo.Bar)b == ["Foo.Bar"]
72+
assert %w(Foo.#{Bar})c == ['Foo.Elixir.Bar']
6873
end
6974

7075
test :__W__ do
@@ -82,5 +87,8 @@ defmodule Kernel.SigilsTest do
8287

8388
bad_modifier = quote do: %W(foo bar baz)x
8489
assert ArgumentError[] = catch_error(Code.eval_quoted(bad_modifier))
90+
91+
assert %W(Foo #{Bar})a == [:"Foo", :"\#{Bar}"]
92+
assert %W(Foo.Bar.Baz)a == [:"Foo.Bar.Baz"]
8593
end
8694
end

0 commit comments

Comments
 (0)