Permalink
Browse files

add a test for ast roundtripping

  • Loading branch information...
1 parent b6a84c0 commit b01bf0f960ef4a00155dd383adeb1fc031ae6940 @tenderlove tenderlove committed Apr 28, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 test/psych/test_parser.rb
View
7 test/psych/test_parser.rb
@@ -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

0 comments on commit b01bf0f

Please sign in to comment.