# YAML Test Matrix

--- &test-S9E8
  Title: Spec Example 5.3. Block Structure Indicators
  Tags: [ mapping, sequence, spec ]

YAML

sequence:
- one
- two
mapping:
  ? sky
  : blue
  sea : green

Expected Events

+STR
+DOC
+MAP
=VAL :sequence
+SEQ
=VAL :one
=VAL :two
-SEQ
=VAL :mapping
+MAP
=VAL :sky
=VAL :blue
=VAL :sea
=VAL :green
-MAP
-MAP
-DOC
-STR

Expected JSON

{
"sequence": [
"one",
"two"
],
"mapping": {
"sky": "blue",
"sea": "green"
}
}

cpp-event

 ok

hs-yaml-event

 ok

java-event

 ok

js-event

 ok

libyaml-event

 ok

nimyaml-event

 ok

perl5-pp-event

 ok

pyyaml-event

 ok

ruamel-event

 ok

hs-yaml-json

 json_ok

java-json

 json_ok

js-json

 json_ok

js-yaml-json

 json_ok

luajit-json

 json_ok

perl5-pm-json

 json_ok

perl5-pp-json

 json_ok

perl5-syck-json

 json_ok

perl5-xs-json

 json_ok

pyyaml-json

 json_ok

ruamel-json

 json_ok

ruby-json

 json_ok

perl5-pegex-event

 diff
Got Events:
+STR
+DOC
+MAP
=VAL :sequence
+SEQ
=VAL :one
=VAL :two
-SEQ
=VAL :mapping
=VAL :  ? sky
+MAP
=VAL :
=VAL :blue
=VAL :sea
=VAL :green
-MAP
-DOC
-STR

perl5-tiny-json

 error
YAML::Tiny does not support a feature in line '  ? sky' at /bin/perl5-tiny-json line 12.

perl5-tiny-pl

 error
YAML::Tiny does not support a feature in line '  ? sky' at /bin/perl5-tiny-pl line 15.

perl5-pm-pl

 na
{
  'mapping' => {
               'sea' => 'green',
               'sky' => 'blue'
             },
  'sequence' => [
                'one',
                'two'
              ]
}

perl5-pp-pl

 na
{
  'mapping' => {
               'sea' => 'green',
               'sky' => 'blue'
             },
  'sequence' => [
                'one',
                'two'
              ]
}

perl5-syck-pl

 na
{
  'mapping' => {
               'sea' => 'green',
               'sky' => 'blue'
             },
  'sequence' => [
                'one',
                'two'
              ]
}

perl5-xs-pl

 na
{
  'mapping' => {
                 'sea' => 'green',
                 'sky' => 'blue'
               },
  'sequence' => [
                  'one',
                  'two'
                ]
}

pyyaml-py

 na
{'mapping': {'sea': 'green', 'sky': 'blue'}, 'sequence': ['one', 'two']}

ruamel-py

 na
{'mapping': {'sea': 'green', 'sky': 'blue'}, 'sequence': ['one', 'two']}