# 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

js-yaml-event

 ok

nim-nimyaml-event

 ok

perl-pp-event

 ok

perl-refparser-event

 ok

py-pyyaml-event

 ok

py-ruamel-event

 ok

rust-yamlrust-event

 ok

c-libfyaml-json

 json_ok

dotnet-yamldotnet-json

 json_ok

go-yaml-json

 json_ok

hs-hsyaml-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

cpp-rapidyaml-event

 diff
Minimal Events:
+STR
+DOC
+MAP
=VAL :a
=VAL :ab\n\ncd\nef\n
-MAP
-DOC ...
-STR
Transformed Events:
+STR
+DOC
+MAP
=VAL :a
=VAL :ab\n\ncd\nef\n
-MAP
-DOC
-STR
Got Events:
+STR
+DOC
+MAP
=VAL :a
=VAL 'ab\n\ncd\nef\n
-MAP
-DOC
-STR

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.

hs-reference-yeast

 na
Line  Col Char Byte Token|Content
   1    0    0    0 +DOC |
   1    0    0    0 +NODE|
   1    0    0    0 +MAP |
   1    0    0    0 +PAIR|
   1    0    0    0 +NODE|
   1    0    0    0 +VAL |
   1    0    0    0 =TEXT|a
   1    1    1    1 -VAL |
   1    1    1    1 -NODE|
   1    1    1    1 =SYNX|:
   1    2    2    2 +NODE|
   1    2    2    2 =WSPC|.
   1    3    3    3 +VAL |
   1    3    3    3 =SYNX||
   1    4    4    4 =EOL |\x0a
   2    0    5    5 =DENT|.
   2    1    6    6 =TEXT|ab
   2    3    8    8 =NEWL|\x0a
   3    0    9    9 =DENT|.
   3    1   10   10 =NEWL|\x0a
   4    0   11   11 =DENT|.
   4    1   12   12 =TEXT|cd
   4    3   14   14 =NEWL|\x0a
   5    0   15   15 =DENT|.
   5    1   16   16 =TEXT|ef
   5    3   18   18 =NEWL|\x0a
   6    0   19   19 -VAL |
   6    0   19   19 =DENT|.
   6    1   20   20 =EOL |\x0a
   7    0   21   21 =EOL |\x0a
   8    0   22   22 -NODE|
   8    0   22   22 -PAIR|
   8    0   22   22 -MAP |
   8    0   22   22 -NODE|
   8    0   22   22 -DOC |
   8    0   22   22 =FOOT|...
   8    3   25   25 =EOL |\x0a

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