summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/psych/test_parser.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/psych/test_parser.rb b/test/psych/test_parser.rb
index d8c53f2..acbdd96 100644
--- a/test/psych/test_parser.rb
+++ b/test/psych/test_parser.rb
@@ -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