# YAML Test Matrix

--- &test-4ZYM
  Title: Spec Example 6.4. Line Prefixes
  Tags: [ double, literal, scalar, spec, upto-1.2, whitespace ]

YAML

plain: text
  lines
quoted: "text
  	lines"
block: |
  text
   	lines

Expected Events

+STR
+DOC
+MAP
=VAL :plain
=VAL :text lines
=VAL :quoted
=VAL "text lines
=VAL :block
=VAL |text\n \tlines\n
-MAP
-DOC
-STR

Expected JSON

{
"block": "text\n \tlines\n",
"plain": "text lines",
"quoted": "text lines"
}

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

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-xs-json

 json_ok

py-pyyaml-json

 json_ok

py-ruamel-json

 json_ok

ruby-psych-json

 json_ok

dotnet-yamldotnet-json

 json_diff
parse error: Invalid string: control characters from U+0000 through U+001F must be escaped at line 1, column 74

perl-syck-json

 json_diff
{
  "block": "text\n \tlines\n",
  "plain": "text lines",
  "quoted": "text \tlines"
}

perl-tiny-json

 error
YAML::Tiny found bad indenting in line '  lines' at /yaml/bin/perl-tiny-json line 12.

perl-tiny-perl

 error
YAML::Tiny found bad indenting in line '  lines' at /yaml/bin/perl-tiny-perl line 15.

perl-yaml-json

 error
YAML Error: Inconsistent indentation level
   Code: YAML_PARSE_ERR_INCONSISTENT_INDENTATION
   Line: 2
   Document: 1
 at /perl5/lib/perl5/YAML/Loader.pm line 804.

perl-yaml-perl

 error
YAML Error: Inconsistent indentation level
   Code: YAML_PARSE_ERR_INCONSISTENT_INDENTATION
   Line: 2
   Document: 1
 at /perl5/lib/perl5/YAML/Loader.pm line 804.

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|plain
   1    5    5    5 -VAL |
   1    5    5    5 -NODE|
   1    5    5    5 =SYNX|:
   1    6    6    6 =WSPC|.
   1    7    7    7 +NODE|
   1    7    7    7 +VAL |
   1    7    7    7 =TEXT|text
   1   11   11   11 =FOLD|\x0a
   2    0   12   12 =DENT|.
   2    1   13   13 =WSPC|.
   2    2   14   14 =TEXT|lines
   2    7   19   19 -VAL |
   2    7   19   19 -NODE|
   2    7   19   19 =EOL |\x0a
   3    0   20   20 -PAIR|
   3    0   20   20 +PAIR|
   3    0   20   20 +NODE|
   3    0   20   20 +VAL |
   3    0   20   20 =TEXT|quoted
   3    6   26   26 -VAL |
   3    6   26   26 -NODE|
   3    6   26   26 =SYNX|:
   3    7   27   27 =WSPC|.
   3    8   28   28 +NODE|
   3    8   28   28 +VAL |
   3    8   28   28 =SYNX|"
   3    9   29   29 =TEXT|text
   3   13   33   33 =FOLD|\x0a
   4    0   34   34 =DENT|.
   4    1   35   35 =WSPC|.\x09
   4    3   37   37 =TEXT|lines
   4    8   42   42 =SYNX|"
   4    9   43   43 -VAL |
   4    9   43   43 -NODE|
   4    9   43   43 =EOL |\x0a
   5    0   44   44 -PAIR|
   5    0   44   44 +PAIR|
   5    0   44   44 +NODE|
   5    0   44   44 +VAL |
   5    0   44   44 =TEXT|block
   5    5   49   49 -VAL |
   5    5   49   49 -NODE|
   5    5   49   49 =SYNX|:
   5    6   50   50 +NODE|
   5    6   50   50 =WSPC|.
   5    7   51   51 +VAL |
   5    7   51   51 =SYNX||
   5    8   52   52 =EOL |\x0a
   6    0   53   53 =DENT|..
   6    2   55   55 =TEXT|text
   6    6   59   59 =NEWL|\x0a
   7    0   60   60 =DENT|..
   7    2   62   62 =TEXT|.\x09lines
   7    9   69   69 =NEWL|\x0a
   8    0   70   70 -VAL |
   8    0   70   70 -NODE|
   8    0   70   70 -PAIR|
   8    0   70   70 -MAP |
   8    0   70   70 -NODE|
   8    0   70   70 -DOC |

perl-pp-perl

 na
{
  'block' => 'text
 	lines
',
  'plain' => 'text lines',
  'quoted' => 'text lines'
}

perl-pplibyaml-perl

 na
{
  'block' => 'text
 	lines
',
  'plain' => 'text lines',
  'quoted' => 'text lines'
}

perl-syck-perl

 na
{
  'block' => 'text
 	lines
',
  'plain' => 'text lines',
  'quoted' => 'text 	lines'
}

perl-xs-perl

 na
{
  'block' => 'text
 	lines
',
  'plain' => 'text lines',
  'quoted' => 'text lines'
}

py-pyyaml-py

 na
{'block': 'text\n \tlines\n', 'plain': 'text lines', 'quoted': 'text lines'}

py-ruamel-py

 na
{'block': 'text\n \tlines\n', 'plain': 'text lines', 'quoted': 'text lines'}