# YAML Test Matrix

--- &test-93JH
  Title: Block Mappings in Block Sequence
  Tags: [ mapping, sequence ]

YAML

 - key: value
   key2: value2
 -
   key3: value3

Expected Events

+STR
+DOC
+SEQ
+MAP
=VAL :key
=VAL :value
=VAL :key2
=VAL :value2
-MAP
+MAP
=VAL :key3
=VAL :value3
-MAP
-SEQ
-DOC
-STR

Expected JSON

[
{
"key": "value",
"key2": "value2"
},
{
"key3": "value3"
}
]

cpp-event

 ok

hs-yaml-event

 ok

java-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-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
+SEQ
=VAL :key
-SEQ
-DOC
+DOC
+MAP
=VAL :
=VAL :value
-MAP
-DOC
+DOC
+MAP
=VAL :key2
=VAL :value2
-MAP
-DOC
+DOC
+SEQ
+MAP
=VAL :key3
=VAL :value3
-MAP
-SEQ
-DOC
-STR

perl5-tiny-json

 error
YAML::Tiny found bad indenting in line ' - key: value' at /bin/perl5-tiny-json line 12.

perl5-tiny-pl

 error
YAML::Tiny found bad indenting in line ' - key: value' at /bin/perl5-tiny-pl line 15.

perl5-pm-pl

 na
[
  {
    'key' => 'value',
    'key2' => 'value2'
  },
  {
    'key3' => 'value3'
  }
]

perl5-pp-pl

 na
[
  {
    'key' => 'value',
    'key2' => 'value2'
  },
  {
    'key3' => 'value3'
  }
]

perl5-syck-pl

 na
[
  {
    'key' => 'value',
    'key2' => 'value2'
  },
  {
    'key3' => 'value3'
  }
]

perl5-xs-pl

 na
[
  {
    'key' => 'value',
    'key2' => 'value2'
  },
  {
    'key3' => 'value3'
  }
]

pyyaml-py

 na
[{'key': 'value', 'key2': 'value2'}, {'key3': 'value3'}]

ruamel-py

 na
[{'key': 'value', 'key2': 'value2'}, {'key3': 'value3'}]