# YAML Test Matrix

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

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"
}

c-libfyaml-event

 ok

c-libyaml-event

 ok

cpp-yamlcpp-event

 ok

dotnet-yamldotnet-event

 ok

hs-hsyaml-event

 ok

java-snakeyaml-event

 ok

js-yaml-event

 ok

nim-nimyaml-event

 ok

perl-pp-event

 ok

perl-pplibyaml-event

 ok

py-pyyaml-event

 ok

py-ruamel-event

 ok

c-libfyaml-json

 json_ok

dotnet-yamldotnet-json

 json_ok

hs-hsyaml-json

 json_ok

java-snakeyaml-json

 json_ok

js-jsyaml-json

 json_ok

js-yaml-json

 json_ok

lua-lyaml-json

 json_ok

perl-pp-json

 json_ok

perl-pplibyaml-json

 json_ok

perl-syck-json

 json_ok

perl-xs-json

 json_ok

py-pyyaml-json

 json_ok

py-ruamel-json

 json_ok

ruby-psych-json

 json_ok

perl-tiny-json

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

perl-yaml-json

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

perl-yaml-perl

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

perl-pp-perl

 na
{
  'a' => 'ab

cd
ef
'
}

perl-pplibyaml-perl

 na
{
  'a' => 'ab

cd
ef
'
}

perl-syck-perl

 na
{
  'a' => 'ab

cd
ef
'
}

perl-tiny-perl

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

perl-xs-perl

 na
{
  'a' => 'ab

cd
ef
'
}

py-pyyaml-py

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

py-ruamel-py

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