diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-04-28 15:24:25 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-04-28 15:24:25 -0700 |
commit | b01bf0f960ef4a00155dd383adeb1fc031ae6940 (patch) | |
tree | f7707ce86f159f076c3f85267895013768d72744 /test | |
parent | b6a84c00c448a9a0fba826eb47c107ec16cac7ce (diff) | |
download | psych-b01bf0f960ef4a00155dd383adeb1fc031ae6940.zip |
add a test for ast roundtripping
Diffstat (limited to 'test')
-rw-r--r-- | test/psych/test_parser.rb | 7 |
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 |