# YAML Test Matrix

--- &test-G5U8
  Title: Plain dashes in flow sequence
  Tags: [ flow, sequence ]

YAML

---
- [-, -]

Expected Events

+STR
+DOC ---
+SEQ
+SEQ
=VAL :-
=VAL :-
-SEQ
-SEQ
-DOC
-STR

Expected JSON

[
[
"-",
"-"
]
]

c-libfyaml-event

 ok

c-libyaml-event

 ok

cpp-yamlcpp-event

 ok

dotnet-yamldotnet-event

 ok

java-snakeyaml-event

 ok

js-yaml-event

 ok

perl-pplibyaml-event

 ok

py-pyyaml-event

 ok

py-ruamel-event

 ok

c-libfyaml-json

 json_ok

dotnet-yamldotnet-json

 json_ok

java-snakeyaml-json

 json_ok

js-yaml-json

 json_ok

lua-lyaml-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

 json_diff
[
  "[-, -]"
]

perl-yaml-json

 json_diff
[
  [
    0,
    0
  ]
]

hs-hsyaml-event

 error
+STR
+DOC ---
+SEQ
+SEQ
-SEQ
Parsing error near byte offset Pos {posByteOffset = 7, posCharOffset = 7, posLine = 2, posColumn = 3} (Unexpected '-')

hs-hsyaml-json

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

js-jsyaml-json

 error
/node/node_modules/js-yaml/lib/js-yaml/loader.js:173
  throw generateError(state, message);
  ^
YAMLException: missed comma between flow collection entries at line 2, column 4:
    - [-, -]
       ^
    at generateError (/node/node_modules/js-yaml/lib/js-yaml/loader.js:167:10)
    at throwError (/node/node_modules/js-yaml/lib/js-yaml/loader.js:173:9)
    at readFlowCollection (/node/node_modules/js-yaml/lib/js-yaml/loader.js:718:7)
    at composeNode (/node/node_modules/js-yaml/lib/js-yaml/loader.js:1360:11)
    at readBlockMapping (/node/node_modules/js-yaml/lib/js-yaml/loader.js:1036:16)
    at composeNode (/node/node_modules/js-yaml/lib/js-yaml/loader.js:1359:12)
    at readBlockSequence (/node/node_modules/js-yaml/lib/js-yaml/loader.js:955:5)
    at composeNode (/node/node_modules/js-yaml/lib/js-yaml/loader.js:1358:12)
    at readDocument (/node/node_modules/js-yaml/lib/js-yaml/loader.js:1519:3)
    at loadDocuments (/node/node_modules/js-yaml/lib/js-yaml/loader.js:1575:5)

nim-nimyaml-event

 error
+STR
+DOC ---
+SEQ
+SEQ
/buildutils/nimyaml_event.nim(8) nimyaml_event
/tmp/NimYAML-0.13.1/yaml/stream.nim(223) finished
Error: unhandled exception: Unexpected toked: ltSeqItemInd [YamlStreamError]

perl-pp-event

 error
+STR
+DOC ---
+SEQ
+SEQ
Line      : 2
Column    : 4
Message   : Invalid plain scalar
Where     : /perl5/lib/perl5/YAML/PP/Lexer.pm line 361
YAML      : "-, -]"
  at /yaml/bin/perl-pp-event line 25.

perl-pp-json

 error
Line      : 2
Column    : 4
Message   : Invalid plain scalar
Where     : /perl5/lib/perl5/YAML/PP/Lexer.pm line 361
YAML      : "-, -]"
  at /perl5/lib/perl5/YAML/PP/Loader.pm line 92.

perl-pp-perl

 error
Line      : 2
Column    : 4
Message   : Invalid plain scalar
Where     : /perl5/lib/perl5/YAML/PP/Lexer.pm line 361
YAML      : "-, -]"
  at /perl5/lib/perl5/YAML/PP/Loader.pm line 92.

perl-pplibyaml-perl

 na
[
  [
    '-',
    '-'
  ]
]

perl-syck-perl

 na
[
  [
    '-',
    '-'
  ]
]

perl-tiny-perl

 na
[
  '[-, -]'
]

perl-xs-perl

 na
[
  [
    '-',
    '-'
  ]
]

perl-yaml-perl

 na
[
  [
    '0',
    '0'
  ]
]
Argument "-" isn't numeric in addition (+) at /perl5/lib/perl5/YAML/Loader.pm line 491, <> line 1.
Argument "-" isn't numeric in addition (+) at /perl5/lib/perl5/YAML/Loader.pm line 491, <> line 1.

py-pyyaml-py

 na
[['-', '-']]

py-ruamel-py

 na
[['-', '-']]