Skip to content

Commit

Permalink
add a test for ast roundtripping
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Apr 28, 2012
1 parent b6a84c0 commit b01bf0f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/psych/test_parser.rb
Expand Up @@ -32,6 +32,13 @@ def setup
@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
Expand Down

0 comments on commit b01bf0f

Please sign in to comment.