diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2009-09-26 22:06:10 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2009-09-26 22:06:10 -0700 |
commit | a78acf40e25f14093ae8d60c04f7f00e99330a38 (patch) | |
tree | 24a1c0619e2c9f048dc7b2d341afcc7e55adbe91 /test/psych/test_parser.rb | |
parent | 81064b63f140ff913cd4e5c9fa57b036fc5dca4e (diff) | |
download | psych-a78acf40e25f14093ae8d60c04f7f00e99330a38.zip |
alias supported
Diffstat (limited to 'test/psych/test_parser.rb')
-rw-r--r-- | test/psych/test_parser.rb | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/test/psych/test_parser.rb b/test/psych/test_parser.rb index d32f63a..83e5482 100644 --- a/test/psych/test_parser.rb +++ b/test/psych/test_parser.rb @@ -23,6 +23,21 @@ module Psych @parser = Psych::Parser.new EventCatcher.new end + def test_alias + @parser.parse(<<-eoyml) +%YAML 1.1 +--- +!!seq [ + !!str "Without properties", + &A !!str "Anchored", + !!str "Tagged", + *A, + !!str "", +] + eoyml + assert_called :alias, ['A'] + end + def test_end_stream @parser.parse("--- foo\n") assert_called :end_stream @@ -38,11 +53,6 @@ module Psych assert_called :end_document, [true] end - def test_end_document_implicit - @parser.parse("\"foo\"\n") - assert_called :end_document, [true] - end - def test_end_document_explicit @parser.parse("\"foo\"\n...") assert_called :end_document, [false] |