diff options
Diffstat (limited to 'test/test_pp.rb')
-rw-r--r-- | test/test_pp.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/test_pp.rb b/test/test_pp.rb index 5f8216dcce..01a5a409b4 100644 --- a/test/test_pp.rb +++ b/test/test_pp.rb @@ -194,4 +194,13 @@ class PPFileStatTest < Test::Unit::TestCase end end +class PPAbstractSyntaxTree < Test::Unit::TestCase + AST = RubyVM::AbstractSyntaxTree + def test_literal + ast = AST.parse("1") + expected = "(SCOPE@1:0-1:1 tbl: [] args: nil body: (LIT@1:0-1:1 1))" + assert_equal(expected, PP.singleline_pp(ast, ''.dup)) + end +end + end |