# YAML Test Matrix

--- &test-9C9N
  Title: Wrong indented flow sequence
  Tags: [ error, flow, indent, sequence ]

YAML

---
flow: [a,
b,
c]

Expected Events

+STR
+DOC ---
+MAP
=VAL :flow
+SEQ
=VAL :a

Expected JSON



c-libyaml-event

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

cpp-yamlcpp-event

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

dotnet-yamldotnet-event

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

dotnet-yamldotnet-json

 invalid_incorrect
{"flow": ["a", "b", "c"]}

java-snakeyaml-event

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

java-snakeyaml-json

 invalid_incorrect
{
  "flow": [
    "a",
    "b",
    "c"
  ]
}

js-jsyaml-json

 invalid_incorrect
{"flow":["a","b","c"]}

lua-lyaml-json

 invalid_incorrect
{"flow":["a","b","c"]}

nim-nimyaml-event

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

perl-pplibyaml-event

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

perl-pplibyaml-json

 invalid_incorrect
{
   "flow" : [
      "a",
      "b",
      "c"
   ]
}

perl-pplibyaml-perl

 invalid_incorrect
{
  'flow' => [
              'a',
              'b',
              'c'
            ]
}

perl-syck-json

 invalid_incorrect
{
   "flow" : [
      "a",
      "b",
      "c"
   ]
}

perl-syck-perl

 invalid_incorrect
{
  'flow' => [
              'a',
              'b',
              'c'
            ]
}

perl-xs-json

 invalid_incorrect
{
   "flow" : [
      "a",
      "b",
      "c"
   ]
}

perl-xs-perl

 invalid_incorrect
{
  'flow' => [
              'a',
              'b',
              'c'
            ]
}

py-pyyaml-event

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

py-pyyaml-json

 invalid_incorrect
{
  "flow": [
    "a",
    "b",
    "c"
  ]
}

py-pyyaml-py

 invalid_incorrect
{'flow': ['a', 'b', 'c']}

py-ruamel-event

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

py-ruamel-json

 invalid_incorrect
{
  "flow": [
    "a",
    "b",
    "c"
  ]
}

py-ruamel-py

 invalid_incorrect
{'flow': ['a', 'b', 'c']}

ruby-psych-json

 invalid_incorrect
{"flow":["a","b","c"]}

c-libfyaml-event

 invalid_correct
stdin:3:1: error: wrongly indented flow sequence
b,
^
+STR
+DOC ---
+MAP
=VAL :flow
+SEQ
=VAL :a

c-libfyaml-json

 invalid_correct
stdin:3:1: error: wrongly indented flow sequence
b,
^

hs-hsyaml-event

 invalid_correct
Parsing error near byte offset Pos {posByteOffset = 13, posCharOffset = 13, posLine = 2, posColumn = 9} (Unexpected '
')
+STR
+DOC ---
+MAP
=VAL :flow
+SEQ
=VAL :a
-SEQ

hs-hsyaml-json

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

js-yaml-event

 invalid_correct
Insufficient indentation in flow collection
+STR
+DOC ---
+MAP
=VAL :flow

js-yaml-json

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

YAMLSemanticError: Insufficient indentation in flow collection
    at FlowCollection.parse (/node/node_modules/yaml/dist/parse-cst.js:1036:30)
    at ParseContext.PlainValue._defineProperty (/node/node_modules/yaml/dist/parse-cst.js:1586:25)
    at CollectionItem.parse (/node/node_modules/yaml/dist/parse-cst.js:92:19)
    at ParseContext.PlainValue._defineProperty (/node/node_modules/yaml/dist/parse-cst.js:1586:25)
    at Collection.parse (/node/node_modules/yaml/dist/parse-cst.js:350:20)
    at ParseContext.PlainValue._defineProperty (/node/node_modules/yaml/dist/parse-cst.js:1605:29)
    at Document.parseContents (/node/node_modules/yaml/dist/parse-cst.js:622:26)
    at Document.parse (/node/node_modules/yaml/dist/parse-cst.js:685:19)
    at Object.parse (/node/node_modules/yaml/dist/parse-cst.js:1723:18)
    at Object.parseAllDocuments (/node/node_modules/yaml/dist/index.js:32:33)

perl-pp-event

 invalid_correct
Line      : 3
Column    : 1
Message   : Bad indendation in FLOWSEQ
Where     : /perl5/lib/perl5/YAML/PP/Parser.pm line 197
YAML      : "b,\n"
  at /yaml/bin/perl-pp-event line 25.
+STR
+DOC ---
+MAP
=VAL :flow
+SEQ
=VAL :a

perl-pp-json

 invalid_correct
Line      : 3
Column    : 1
Message   : Bad indendation in FLOWSEQ
Where     : /perl5/lib/perl5/YAML/PP/Parser.pm line 197
YAML      : "b,\n"
  at /perl5/lib/perl5/YAML/PP/Loader.pm line 92.

perl-pp-perl

 invalid_correct
Line      : 3
Column    : 1
Message   : Bad indendation in FLOWSEQ
Where     : /perl5/lib/perl5/YAML/PP/Parser.pm line 197
YAML      : "b,\n"
  at /perl5/lib/perl5/YAML/PP/Loader.pm line 92.

perl-tiny-json

 invalid_correct
YAML::Tiny failed to classify line 'b,' at /yaml/bin/perl-tiny-json line 12.

perl-tiny-perl

 invalid_correct
YAML::Tiny failed to classify line 'b,' at /yaml/bin/perl-tiny-perl line 15.

perl-yaml-json

 invalid_correct
YAML Error: Can't parse inline sequence
   Code: YAML_PARSE_ERR_INLINE_SEQUENCE
   Line: 3
   Document: 1
 at /perl5/lib/perl5/YAML/Loader.pm line 551.

perl-yaml-perl

 invalid_correct
YAML Error: Can't parse inline sequence
   Code: YAML_PARSE_ERR_INLINE_SEQUENCE
   Line: 3
   Document: 1
 at /perl5/lib/perl5/YAML/Loader.pm line 551.