summaryrefslogtreecommitdiff
path: root/test/test_pp.rb
diff options
context:
space:
mode:
authorCharles Oliver Nutter <headius@headius.com>2020-03-05 16:48:52 -0600
committerCharles Oliver Nutter <headius@headius.com>2020-03-05 16:49:27 -0600
commite57dd8c2b52557f5564b9a1d9d38df66e4d090c9 (patch)
treebe646821dd1af5a3bc9c82e18063b3eeb1cdff0c /test/test_pp.rb
parent17d5efa4fefdceee0e0d3c810b9fee1cee2e2628 (diff)
Mask RubyVM-specific test
Diffstat (limited to 'test/test_pp.rb')
-rw-r--r--test/test_pp.rb14
1 files changed, 8 insertions, 6 deletions
diff --git a/test/test_pp.rb b/test/test_pp.rb
index 3434c2b..4aa3195 100644
--- a/test/test_pp.rb
+++ b/test/test_pp.rb
@@ -211,12 +211,14 @@ class PPFileStatTest < Test::Unit::TestCase
end
end
-class PPAbstractSyntaxTree < Test::Unit::TestCase
- AST = RubyVM::AbstractSyntaxTree
- def test_lasgn_literal
- ast = AST.parse("_=1")
- 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)
+if defined?(RubyVM)
+ class PPAbstractSyntaxTree < Test::Unit::TestCase
+ AST = RubyVM::AbstractSyntaxTree
+ def test_lasgn_literal
+ ast = AST.parse("_=1")
+ 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