diff --git a/test/parser.jl b/test/parser.jl index 68f7be5bbb47b..7354dd7f8fd07 100644 --- a/test/parser.jl +++ b/test/parser.jl @@ -86,3 +86,14 @@ macro test999_str(args...); args; end # issue #10985 @test expand(:(f(::Int...) = 1)).head == :method + +# issue #11332 +@test parse("export \$(symbol(\"A\"))") == :(export $(Expr(:$, :(symbol("A"))))) +@test parse("export \$A") == :(export $(Expr(:$, :A))) +@test parse("using \$a.\$b") == Expr(:using, Expr(:$, :a), Expr(:$, :b)) +@test parse("using \$a.\$b, \$c") == Expr(:toplevel, Expr(:using, Expr(:$, :a), + Expr(:$, :b)), + Expr(:using, Expr(:$, :c))) +@test parse("using \$a: \$b, \$c.\$d") == + Expr(:toplevel, Expr(:using, Expr(:$, :a), Expr(:$, :b)), + Expr(:using, Expr(:$, :a), Expr(:$, :c), Expr(:$, :d)))