Skip to content

Commit

Permalink
Add test for parsing import/using
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyichao committed May 24, 2015
1 parent 33ab0f6 commit b2c2d42
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions test/parser.jl
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,26 @@ macro test999_str(args...); args; end

# issue #10985
@test expand(:(f(::Int...) = 1)).head == :method

# issue #10910
@test parse(":(using A)") == Expr(:quote, Expr(:using, :A))
@test parse(":(using A.b, B)") == Expr(:quote,
Expr(:toplevel,
Expr(:using, :A, :b),
Expr(:using, :B)))
@test parse(":(using A: b, c.d)") == Expr(:quote,
Expr(:toplevel,
Expr(:using, :A, :b),
Expr(:using, :A, :c, :d)))

@test parse(":(importall A)") == Expr(:quote, Expr(:importall, :A))

@test parse(":(import A)") == Expr(:quote, Expr(:import, :A))
@test parse(":(import A.b, B)") == Expr(:quote,
Expr(:toplevel,
Expr(:import, :A, :b),
Expr(:import, :B)))
@test parse(":(import A: b, c.d)") == Expr(:quote,
Expr(:toplevel,
Expr(:import, :A, :b),
Expr(:import, :A, :c, :d)))

0 comments on commit b2c2d42

Please sign in to comment.