# YAML Test Matrix

--- &test-A6F9
  Title: Spec Example 8.4. Chomping Final Line Break
  Tags: [ literal, scalar, spec ]

YAML

strip: |-
  text
clip: |
  text
keep: |+
  text

Expected Events

+STR
+DOC
+MAP
=VAL :strip
=VAL |text
=VAL :clip
=VAL |text\n
=VAL :keep
=VAL |text\n
-MAP
-DOC
-STR

Expected JSON

{
"clip": "text\n",
"keep": "text\n",
"strip": "text"
}

c-libfyaml-event

 ok

c-libyaml-event

 ok

cpp-rapidyaml-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-tiny-json

 json_ok

perl-xs-json

 json_ok

perl-yaml-json

 json_ok

py-pyyaml-json

 json_ok

py-ruamel-json

 json_ok

ruby-psych-json

 json_ok

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|strip
   1    5    5    5 -VAL |
   1    5    5    5 -NODE|
   1    5    5    5 =SYNX|:
   1    6    6    6 +NODE|
   1    6    6    6 =WSPC|.
   1    7    7    7 +VAL |
   1    7    7    7 =SYNX||
   1    8    8    8 =SYNX|-
   1    9    9    9 =EOL |\x0a
   2    0   10   10 =DENT|..
   2    2   12   12 =TEXT|text
   2    6   16   16 -VAL |
   2    6   16   16 =EOL |\x0a
   3    0   17   17 -NODE|
   3    0   17   17 -PAIR|
   3    0   17   17 +PAIR|
   3    0   17   17 +NODE|
   3    0   17   17 +VAL |
   3    0   17   17 =TEXT|clip
   3    4   21   21 -VAL |
   3    4   21   21 -NODE|
   3    4   21   21 =SYNX|:
   3    5   22   22 +NODE|
   3    5   22   22 =WSPC|.
   3    6   23   23 +VAL |
   3    6   23   23 =SYNX||
   3    7   24   24 =EOL |\x0a
   4    0   25   25 =DENT|..
   4    2   27   27 =TEXT|text
   4    6   31   31 =NEWL|\x0a
   5    0   32   32 -VAL |
   5    0   32   32 -NODE|
   5    0   32   32 -PAIR|
   5    0   32   32 +PAIR|
   5    0   32   32 +NODE|
   5    0   32   32 +VAL |
   5    0   32   32 =TEXT|keep
   5    4   36   36 -VAL |
   5    4   36   36 -NODE|
   5    4   36   36 =SYNX|:
   5    5   37   37 +NODE|
   5    5   37   37 =WSPC|.
   5    6   38   38 +VAL |
   5    6   38   38 =SYNX||
   5    7   39   39 =SYNX|+
   5    8   40   40 =EOL |\x0a
   6    0   41   41 =DENT|..
   6    2   43   43 =TEXT|text
   6    6   47   47 =NEWL|\x0a
   7    0   48   48 -VAL |
   7    0   48   48 -NODE|
   7    0   48   48 -PAIR|
   7    0   48   48 -MAP |
   7    0   48   48 -NODE|
   7    0   48   48 -DOC |

perl-pp-perl

 na
{
  'clip' => 'text
',
  'keep' => 'text
',
  'strip' => 'text'
}

perl-pplibyaml-perl

 na
{
  'clip' => 'text
',
  'keep' => 'text
',
  'strip' => 'text'
}

perl-syck-perl

 na
{
  'clip' => 'text
',
  'keep' => 'text
',
  'strip' => 'text'
}

perl-tiny-perl

 na
{
  'clip' => 'text
',
  'keep' => 'text
',
  'strip' => 'text'
}

perl-xs-perl

 na
{
  'clip' => 'text
',
  'keep' => 'text
',
  'strip' => 'text'
}

perl-yaml-perl

 na
{
  'clip' => 'text
',
  'keep' => 'text
',
  'strip' => 'text'
}

py-pyyaml-py

 na
{'clip': 'text\n', 'keep': 'text\n', 'strip': 'text'}

py-ruamel-py

 na
{'clip': 'text\n', 'keep': 'text\n', 'strip': 'text'}