# YAML Test Matrix

--- &test-M29M
  Title: Literal Block Scalar
  Tags: [ scalar ]

YAML

a: |
 ab
 
 cd
 ef
 

...

Expected Events

+STR
+DOC
+MAP
=VAL :a
=VAL |ab\n\ncd\nef\n
-MAP
-DOC ...
-STR

Expected JSON

{
"a": "ab\n\ncd\nef\n"
}

cpp-event

 ok

hs-yaml-event

 ok

java-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-yaml-json

 json_ok

luajit-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-tiny-json

 json_diff
{
  "a": "ab\ncd\nef\n"
}

perl5-pm-json

 error
YAML Error: Invalid element in map
   Code: YAML_LOAD_ERR_BAD_MAP_ELEMENT
   Line: 8
   Document: 1
 at /lib/perl5/YAML/Loader.pm line 360.

perl5-pm-pl

 error
YAML Error: Invalid element in map
   Code: YAML_LOAD_ERR_BAD_MAP_ELEMENT
   Line: 8
   Document: 1
 at /lib/perl5/YAML/Loader.pm line 360.

perl5-pp-pl

 na
{
  'a' => 'ab

cd
ef
'
}

perl5-syck-pl

 na
{
  'a' => 'ab

cd
ef
'
}

perl5-tiny-pl

 na
{
  'a' => 'ab
cd
ef
'
}

perl5-xs-pl

 na
{
  'a' => 'ab

cd
ef
'
}

pyyaml-py

 na
{'a': 'ab\n\ncd\nef\n'}

ruamel-py

 na
{'a': 'ab\n\ncd\nef\n'}