mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Mask RubyVM-specific test
This commit is contained in:
parent
17d5efa4fe
commit
e57dd8c2b5
1 changed files with 8 additions and 6 deletions
|
@ -211,12 +211,14 @@ class PPFileStatTest < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
class PPAbstractSyntaxTree < Test::Unit::TestCase
|
if defined?(RubyVM)
|
||||||
AST = RubyVM::AbstractSyntaxTree
|
class PPAbstractSyntaxTree < Test::Unit::TestCase
|
||||||
def test_lasgn_literal
|
AST = RubyVM::AbstractSyntaxTree
|
||||||
ast = AST.parse("_=1")
|
def test_lasgn_literal
|
||||||
expected = "(SCOPE@1:0-1:3 tbl: [:_] args: nil body: (LASGN@1:0-1:3 :_ (LIT@1:2-1:3 1)))"
|
ast = AST.parse("_=1")
|
||||||
assert_equal(expected, PP.singleline_pp(ast, ''.dup), ast)
|
expected = "(SCOPE@1:0-1:3 tbl: [:_] args: nil body: (LASGN@1:0-1:3 :_ (LIT@1:2-1:3 1)))"
|
||||||
|
assert_equal(expected, PP.singleline_pp(ast, ''.dup), ast)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue