# YAML Test Matrix

--- &test-L24T:01
  Title: Trailing line of spaces
  Tags: [ whitespace ]

YAML

foo: |
  x
   

Expected Events

+STR
+DOC
+MAP
=VAL :foo
=VAL |x\n \n
-MAP
-DOC
-STR

Expected JSON

{
"foo": "x\n \n"
}

c-libfyaml-event

 ok

cpp-rapidyaml-event

 ok

nim-nimyaml-event

 ok

perl-pp-event

 ok

perl-refparser-event

 ok

c-libfyaml-json

 json_ok

js-jsyaml-json

 json_ok

perl-pp-json

 json_ok

perl-yaml-json

 json_ok

raku-yamlish-json

 json_ok

c-libyaml-event

 diff
Got Events:
+STR
+DOC
+MAP
=VAL :foo
=VAL |x\n 
-MAP
-DOC
-STR

cpp-yamlcpp-event

 diff
Minimal Events:
+STR
+DOC
+MAP
=VAL :foo
=VAL :x\n \n
-MAP
-DOC
-STR
Transformed Events:
+STR
+DOC
+MAP
=VAL :foo
=VAL :x\n 
-MAP
-DOC
-STR
Got Events:
+STR
+DOC
+MAP
=VAL :foo
=VAL :x\n 
-MAP
-DOC
-STR

dotnet-yamldotnet-event

 diff
Minimal Events:
+STR
+DOC
+MAP
=VAL :foo
=VAL |x\n \n
-MAP
-DOC
-STR
Got Events:
+STR
+DOC
+MAP
=VAL :foo
=VAL |x\n 
-MAP
-DOC
-STR

java-snakeengine-event

 diff
Got Events:
+STR
+DOC
+MAP
=VAL :foo
=VAL |x\n 
-MAP
-DOC
-STR

java-snakeyaml-event

 diff
Got Events:
+STR
+DOC
+MAP
=VAL :foo
=VAL |x\n 
-MAP
-DOC
-STR

js-yaml-event

 diff
Got Events:
+STR
+DOC
+MAP
=VAL :foo
=VAL |x\n
-MAP
-DOC
-STR

py-pyyaml-event

 diff
Got Events:
+STR
+DOC
+MAP
=VAL :foo
=VAL |x\n 
-MAP
-DOC
-STR

py-ruamel-event

 diff
Got Events:
+STR
+DOC
+MAP
=VAL :foo
=VAL |x\n 
-MAP
-DOC
-STR

rust-yamlrust-event

 diff
Minimal Events:
+STR
+DOC
+MAP
=VAL :foo
=VAL |x\n \n
-MAP
-DOC
-STR
Transformed Events:
+STR
+DOC
+MAP
=VAL :foo
=VAL |x\n 
-MAP
-DOC
-STR
Got Events:
+STR
+DOC
+MAP
=VAL :foo
=VAL |x\n 
-MAP
-DOC
-STR

dotnet-yamldotnet-json

 json_diff
{
  "foo": "x\n "
}

go-yaml-json

 json_diff
{
  "foo": "x\n "
}

java-snakeengine-json

 json_diff
{
  "foo": "x\n "
}

java-snakeyaml-json

 json_diff
{
  "foo": "x\n "
}

js-yaml-json

 json_diff
{
  "foo": "x\n"
}

lua-lyaml-json

 json_diff
{
  "foo": "x\n "
}

perl-pplibyaml-json

 json_diff
{
  "foo": "x\n "
}

perl-syck-json

 json_diff
{
  "foo": "x\n"
}

perl-tiny-json

 json_diff
{
  "foo": "x\n"
}

perl-xs-json

 json_diff
{
  "foo": "x\n "
}

py-pyyaml-json

 json_diff
{
  "foo": "x\n "
}

py-ruamel-json

 json_diff
{
  "foo": "x\n "
}

ruby-psych-json

 json_diff
{
  "foo": "x\n "
}

hs-hsyaml-event

 error
+STR
+DOC
+MAP
=VAL :foo
=VAL |
-MAP
-DOC
Parsing error near byte offset Pos {posByteOffset = 7, posCharOffset = 7, posLine = 2, posColumn = 0} (Unexpected ' ')

hs-hsyaml-json

 error
hsyaml-parser: user error (Unexpected ' ')

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|foo
   1    3    3    3 -VAL |
   1    3    3    3 -NODE|
   1    3    3    3 =SYNX|:
   1    4    4    4 +NODE|
   1    4    4    4 =WSPC|.
   1    5    5    5 +VAL |
   1    5    5    5 =SYNX||
   1    6    6    6 =EOL |\x0a
   2    0    7    7 -VAL |
   2    0    7    7 -NODE|
   2    0    7    7 -PAIR|
   2    0    7    7 -MAP |
   2    0    7    7 -NODE|
   2    0    7    7 -DOC |
   2    0    7    7 =ERR |Unexpected.'.'

perl-pp-perl

 na
{
  'foo' => 'x
 
'
}

perl-pplibyaml-perl

 na
{
  'foo' => 'x
 '
}

perl-syck-perl

 na
{
  'foo' => 'x
'
}

perl-tiny-perl

 na
{
  'foo' => 'x
'
}

perl-xs-perl

 na
{
  'foo' => 'x
 '
}

perl-yaml-perl

 na
{
  'foo' => 'x
 
'
}

py-pyyaml-py

 na
{'foo': 'x\n '}

py-ruamel-py

 na
{'foo': 'x\n '}

raku-yamlish-raku

 na
{
  foo => "x\n \n".Str,
}