# YAML Test Matrix

--- &test-HMK4
  Title: Spec Example 2.16. Indentation determines scope
  Tags: [ folded, literal, spec ]

YAML

name: Mark McGwire
accomplishment: >
  Mark set a major league
  home run record in 1998.
stats: |
  65 Home Runs
  0.278 Batting Average

Expected Events

+STR
+DOC
+MAP
=VAL :name
=VAL :Mark McGwire
=VAL :accomplishment
=VAL >Mark set a major league home run record in 1998.\n
=VAL :stats
=VAL |65 Home Runs\n0.278 Batting Average\n
-MAP
-DOC
-STR

Expected JSON

{
"name": "Mark McGwire",
"accomplishment": "Mark set a major league home run record in 1998.\n",
"stats": "65 Home Runs\n0.278 Batting Average\n"
}

cpp-event

 ok

hs-yaml-event

 ok

java-event

 ok

js-event

 ok

libyaml-event

 ok

nimyaml-event

 ok

perl5-pegex-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-tiny-json

 json_ok

perl5-xs-json

 json_ok

pyyaml-json

 json_ok

ruamel-json

 json_ok

ruby-json

 json_ok

perl5-pm-pl

 na
{
  'accomplishment' => 'Mark set a major league home run record in 1998.
',
  'name' => 'Mark McGwire',
  'stats' => '65 Home Runs
0.278 Batting Average
'
}

perl5-pp-pl

 na
{
  'accomplishment' => 'Mark set a major league home run record in 1998.
',
  'name' => 'Mark McGwire',
  'stats' => '65 Home Runs
0.278 Batting Average
'
}

perl5-syck-pl

 na
{
  'accomplishment' => 'Mark set a major league home run record in 1998.
',
  'name' => 'Mark McGwire',
  'stats' => '65 Home Runs
0.278 Batting Average
'
}

perl5-tiny-pl

 na
{
  'accomplishment' => 'Mark set a major league home run record in 1998.
',
  'name' => 'Mark McGwire',
  'stats' => '65 Home Runs
0.278 Batting Average
'
}

perl5-xs-pl

 na
{
  'accomplishment' => 'Mark set a major league home run record in 1998.
',
  'name' => 'Mark McGwire',
  'stats' => '65 Home Runs
0.278 Batting Average
'
}

pyyaml-py

 na
{'accomplishment': 'Mark set a major league home run record in 1998.\n',
 'name': 'Mark McGwire',
 'stats': '65 Home Runs\n0.278 Batting Average\n'}

ruamel-py

 na
{'accomplishment': 'Mark set a major league home run record in 1998.\n',
 'name': 'Mark McGwire',
 'stats': '65 Home Runs\n0.278 Batting Average\n'}