From b01bf0f960ef4a00155dd383adeb1fc031ae6940 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Sat, 28 Apr 2012 15:24:25 -0700 Subject: add a test for ast roundtripping --- test/psych/test_parser.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test') 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 -- cgit v1.2.3