diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2009-09-27 15:17:51 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2009-09-27 15:17:51 -0700 |
commit | 56c5edfd2141145f2c3aa1f7010cf2e41a7e8662 (patch) | |
tree | 51348546a1f4f0ae0916cbc315f940f5d7277d8d /test/psych/test_parser.rb | |
parent | 6d0f682f6ab3289c3150d1da120b1d90e6913e0b (diff) | |
download | psych-56c5edfd2141145f2c3aa1f7010cf2e41a7e8662.zip |
start_sequence implemented
Diffstat (limited to 'test/psych/test_parser.rb')
-rw-r--r-- | test/psych/test_parser.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/psych/test_parser.rb b/test/psych/test_parser.rb index 85ddb8a..4ad7b6a 100644 --- a/test/psych/test_parser.rb +++ b/test/psych/test_parser.rb @@ -24,6 +24,26 @@ module Psych @parser = Psych::Parser.new EventCatcher.new end + def test_sequence_start_anchor + @parser.parse("---\n&A [1, 2]") + assert_called :start_sequence, ["A", true, FLOW_SEQUENCE_STYLE] + end + + def test_sequence_start_tag + @parser.parse("---\n!!seq [1, 2]") + assert_called :start_sequence, ["tag:yaml.org,2002:seq", false, FLOW_SEQUENCE_STYLE] + end + + def test_sequence_start_flow + @parser.parse("---\n[1, 2]") + assert_called :start_sequence, [true, FLOW_SEQUENCE_STYLE] + end + + def test_sequence_start_block + @parser.parse("---\n - 1\n - 2") + assert_called :start_sequence, [true, BLOCK_SEQUENCE_STYLE] + end + def test_literal_scalar @parser.parse(<<-eoyml) %YAML 1.1 |