Skip to content

Commit

Permalink
Add test for parsing using/export with interpolation.
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyichao committed May 26, 2015
1 parent 91eb633 commit 1415d5f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/parser.jl
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,14 @@ macro test999_str(args...); args; end
Expr(:toplevel,
Expr(:import, :A, :b),
Expr(:import, :A, :c, :d)))

# 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)))

0 comments on commit 1415d5f

Please sign in to comment.