# YAML Test Matrix

--- &test-QB6E
  Title: Wrong indented multiline quoted scalar
  Tags: [ double, error, indent ]

YAML

---
quoted: "a
b
c"

Expected Events

+STR
+DOC ---
+MAP
=VAL :quoted

Expected JSON



c-libyaml-event

 invalid_incorrect
+STR
+DOC ---
+MAP
=VAL :quoted
=VAL "a b c
-MAP
-DOC
-STR

cpp-yamlcpp-event

 invalid_incorrect
+STR
+DOC
+MAP
=VAL :quoted
=VAL :a b c
-MAP
-DOC
-STR

dotnet-yamldotnet-event

 invalid_incorrect
+STR
+DOC ---
+MAP
=VAL :quoted
=VAL "a b c
-MAP
-DOC
-STR

dotnet-yamldotnet-json

 invalid_incorrect
{"quoted": "a b c"}

java-snakeyaml-event

 invalid_incorrect
+STR
+DOC ---
+MAP
=VAL :quoted
=VAL "a b c
-MAP
-DOC
-STR

java-snakeyaml-json

 invalid_incorrect
{
  "quoted": "a b c"
}

js-jsyaml-json

 invalid_incorrect
{"quoted":"a b c"}

lua-lyaml-json

 invalid_incorrect
{"quoted":"a b c"}

nim-nimyaml-event

 invalid_incorrect
+STR
+DOC ---
+MAP
=VAL :quoted
=VAL "a b c
-MAP
-DOC
-STR

perl-pplibyaml-event

 invalid_incorrect
+STR
+DOC ---
+MAP
=VAL :quoted
=VAL "a b c
-MAP
-DOC
-STR

perl-pplibyaml-json

 invalid_incorrect
{
   "quoted" : "a b c"
}

perl-pplibyaml-perl

 invalid_incorrect
{
  'quoted' => 'a b c'
}

perl-syck-json

 invalid_incorrect
{
   "quoted" : "a b c"
}

perl-syck-perl

 invalid_incorrect
{
  'quoted' => 'a b c'
}

perl-xs-json

 invalid_incorrect
{
   "quoted" : "a b c"
}

perl-xs-perl

 invalid_incorrect
{
  'quoted' => 'a b c'
}

py-pyyaml-event

 invalid_incorrect
+STR
+DOC ---
+MAP
=VAL :quoted
=VAL "a b c
-MAP
-DOC
-STR

py-pyyaml-json

 invalid_incorrect
{
  "quoted": "a b c"
}

py-pyyaml-py

 invalid_incorrect
{'quoted': 'a b c'}

py-ruamel-event

 invalid_incorrect
+STR
+DOC ---
+MAP
=VAL :quoted
=VAL "a b c
-MAP
-DOC
-STR

py-ruamel-json

 invalid_incorrect
{
  "quoted": "a b c"
}

py-ruamel-py

 invalid_incorrect
{'quoted': 'a b c'}

ruby-psych-json

 invalid_incorrect
{"quoted":"a b c"}

c-libfyaml-event

 invalid_correct
stdin:2:9: error: wrongly indented double-quoted scalar
quoted: "a
        ^~
b
~
+STR
+DOC ---
+MAP
=VAL :quoted

c-libfyaml-json

 invalid_correct
stdin:2:9: error: wrongly indented double-quoted scalar
quoted: "a
        ^~
b
~

hs-hsyaml-event

 invalid_correct
Parsing error near byte offset Pos {posByteOffset = 14, posCharOffset = 14, posLine = 2, posColumn = 10} (Unexpected '
')
+STR
+DOC ---
+MAP
=VAL :quoted
=VAL "a

hs-hsyaml-json

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

js-yaml-event

 invalid_correct
Multi-line double-quoted string needs to be sufficiently indented
+STR
+DOC ---
+MAP
=VAL :quoted

js-yaml-json

 invalid_correct
/yaml/bin/js-yaml-json:8
  if (doc.errors.length !== 0) throw doc.errors[0]
                               ^

YAMLSemanticError: Multi-line double-quoted string needs to be sufficiently indented
    at QuoteDouble.get strValue [as strValue] (/node/node_modules/yaml/dist/parse-cst.js:1215:32)
    at Object.resolveString [as resolve] (/node/node_modules/yaml/dist/resolveSeq-4a68b39b.js:1282:20)
    at resolveByTagName (/node/node_modules/yaml/dist/resolveSeq-4a68b39b.js:1384:25)
    at resolveTag (/node/node_modules/yaml/dist/resolveSeq-4a68b39b.js:1414:17)
    at resolveNodeValue (/node/node_modules/yaml/dist/resolveSeq-4a68b39b.js:1535:23)
    at resolveNode (/node/node_modules/yaml/dist/resolveSeq-4a68b39b.js:1583:15)
    at resolveBlockMapItems (/node/node_modules/yaml/dist/resolveSeq-4a68b39b.js:1777:38)
    at Object.resolveMap [as resolve] (/node/node_modules/yaml/dist/resolveSeq-4a68b39b.js:1612:79)
    at resolveByTagName (/node/node_modules/yaml/dist/resolveSeq-4a68b39b.js:1384:25)
    at resolveTag (/node/node_modules/yaml/dist/resolveSeq-4a68b39b.js:1414:17)

perl-pp-event

 invalid_correct
Line      : 3
Column    : 1
Message   : Wrong indendation or missing closing quote <">
Where     : /perl5/lib/perl5/YAML/PP/Lexer.pm line 649
YAML      : "b"
  at /yaml/bin/perl-pp-event line 25.
+STR
+DOC ---
+MAP
=VAL :quoted

perl-pp-json

 invalid_correct
Line      : 3
Column    : 1
Message   : Wrong indendation or missing closing quote <">
Where     : /perl5/lib/perl5/YAML/PP/Lexer.pm line 649
YAML      : "b"
  at /perl5/lib/perl5/YAML/PP/Loader.pm line 92.

perl-pp-perl

 invalid_correct
Line      : 3
Column    : 1
Message   : Wrong indendation or missing closing quote <">
Where     : /perl5/lib/perl5/YAML/PP/Lexer.pm line 649
YAML      : "b"
  at /perl5/lib/perl5/YAML/PP/Loader.pm line 92.

perl-tiny-json

 invalid_correct
YAML::Tiny does not support a feature in line '"a' at /yaml/bin/perl-tiny-json line 12.

perl-tiny-perl

 invalid_correct
YAML::Tiny does not support a feature in line '"a' at /yaml/bin/perl-tiny-perl line 15.

perl-yaml-json

 invalid_correct
YAML Error: Can't parse double quoted string
   Code: YAML_PARSE_ERR_BAD_DOUBLE
   Line: 3
   Document: 1
 at /perl5/lib/perl5/YAML/Loader.pm line 574.

perl-yaml-perl

 invalid_correct
YAML Error: Can't parse double quoted string
   Code: YAML_PARSE_ERR_BAD_DOUBLE
   Line: 3
   Document: 1
 at /perl5/lib/perl5/YAML/Loader.pm line 574.