# YAML Test Matrix

--- &test-4CQQ
  Title: Spec Example 2.18. Multi-line Flow Scalars
  Tags: [ scalar, spec ]

YAML

plain:
  This unquoted scalar
  spans many lines.

quoted: "So does this
  quoted scalar.\n"

Expected Events

+STR
+DOC
+MAP
=VAL :plain
=VAL :This unquoted scalar spans many lines.
=VAL :quoted
=VAL "So does this quoted scalar.\n
-MAP
-DOC
-STR

Expected JSON

{
"plain": "This unquoted scalar spans many lines.",
"quoted": "So does this quoted scalar.\n"
}

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

 json_ok

py-pyyaml-json

 json_ok

py-ruamel-json

 json_ok

ruby-psych-json

 json_ok

perl-tiny-json

 error
YAML::Tiny failed to classify line '  This unquoted scalar' at /yaml/bin/perl-tiny-json line 12.

perl-tiny-perl

 error
YAML::Tiny failed to classify line '  This unquoted scalar' at /yaml/bin/perl-tiny-perl line 15.

perl-yaml-json

 error
YAML Error: Expected separator '---'
   Code: YAML_PARSE_ERR_NO_SEPARATOR
   Line: 2
   Document: 2
 at /perl5/lib/perl5/YAML/Loader.pm line 88.

perl-yaml-perl

 error
YAML Error: Expected separator '---'
   Code: YAML_PARSE_ERR_NO_SEPARATOR
   Line: 2
   Document: 2
 at /perl5/lib/perl5/YAML/Loader.pm line 88.

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 =EOL |\x0a
   2    0    7    7 =DENT|.
   2    1    8    8 =WSPC|.
   2    2    9    9 +NODE|
   2    2    9    9 +VAL |
   2    2    9    9 =TEXT|This.unquoted.scalar
   2   22   29   29 =FOLD|\x0a
   3    0   30   30 =DENT|.
   3    1   31   31 =WSPC|.
   3    2   32   32 =TEXT|spans.many.lines.
   3   19   49   49 -VAL |
   3   19   49   49 -NODE|
   3   19   49   49 =EOL |\x0a
   4    0   50   50 =EOL |\x0a
   5    0   51   51 -PAIR|
   5    0   51   51 +PAIR|
   5    0   51   51 +NODE|
   5    0   51   51 +VAL |
   5    0   51   51 =TEXT|quoted
   5    6   57   57 -VAL |
   5    6   57   57 -NODE|
   5    6   57   57 =SYNX|:
   5    7   58   58 =WSPC|.
   5    8   59   59 +NODE|
   5    8   59   59 +VAL |
   5    8   59   59 =SYNX|"
   5    9   60   60 =TEXT|So.does.this
   5   21   72   72 =FOLD|\x0a
   6    0   73   73 =DENT|.
   6    1   74   74 =WSPC|.
   6    2   75   75 =TEXT|quoted.scalar.
   6   16   89   89 +ESC |
   6   16   89   89 =SYNX|\x5c
   6   17   90   90 =META|n
   6   18   91   91 -ESC |
   6   18   91   91 =SYNX|"
   6   19   92   92 -VAL |
   6   19   92   92 -NODE|
   6   19   92   92 =EOL |\x0a
   7    0   93   93 -PAIR|
   7    0   93   93 -MAP |
   7    0   93   93 -NODE|
   7    0   93   93 -DOC |

perl-pp-perl

 na
{
  'plain' => 'This unquoted scalar spans many lines.',
  'quoted' => 'So does this quoted scalar.
'
}

perl-pplibyaml-perl

 na
{
  'plain' => 'This unquoted scalar spans many lines.',
  'quoted' => 'So does this quoted scalar.
'
}

perl-syck-perl

 na
{
  'plain' => 'This unquoted scalar spans many lines.',
  'quoted' => 'So does this quoted scalar.
'
}

perl-xs-perl

 na
{
  'plain' => 'This unquoted scalar spans many lines.',
  'quoted' => 'So does this quoted scalar.
'
}

py-pyyaml-py

 na
{'plain': 'This unquoted scalar spans many lines.',
 'quoted': 'So does this quoted scalar.\n'}

py-ruamel-py

 na
{'plain': 'This unquoted scalar spans many lines.',
 'quoted': 'So does this quoted scalar.\n'}