From 70304ca764f861c29e9707f5f2a9620ce19bfd00 Mon Sep 17 00:00:00 2001 From: Yichao Yu Date: Mon, 18 May 2015 21:47:55 -0400 Subject: [PATCH] Add test for parsing using/export with interpolation. --- test/parser.jl | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/parser.jl b/test/parser.jl index 84830eafbaa1b..e08ad259411d8 100644 --- a/test/parser.jl +++ b/test/parser.jl @@ -83,3 +83,14 @@ macro test999_str(args...); args; end # issue #10994 @test parse("1 + #= \0 =# 2") == :(1 + 2) + +# 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)))