mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
add a test for yaml ast roundtripping
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
874acd7347
commit
75cff1d7d0
1 changed files with 7 additions and 0 deletions
|
@ -32,6 +32,13 @@ module Psych
|
|||
@handler.parser = @parser
|
||||
end
|
||||
|
||||
def test_ast_roundtrip
|
||||
parser = Psych.parser
|
||||
parser.parse('null')
|
||||
ast = parser.handler.root
|
||||
assert_match(/^null/, ast.yaml)
|
||||
end
|
||||
|
||||
def test_exception_memory_leak
|
||||
yaml = <<-eoyaml
|
||||
%YAML 1.1
|
||||
|
|
Loading…
Add table
Reference in a new issue