# YAML Test Matrix

--- &test-DBG4
  Title: Spec Example 7.10. Plain Characters
  Tags: [ flow, scalar, sequence, spec ]

YAML

# Outside flow collection:
- ::vector
- ": - ()"
- Up, up, and away!
- -123
- http://example.com/foo#bar
# Inside flow collection:
- [ ::vector,
  ": - ()",
  "Up, up and away!",
  -123,
  http://example.com/foo#bar ]

Expected Events

+STR
+DOC
+SEQ
=VAL :::vector
=VAL ": - ()
=VAL :Up, up, and away!
=VAL :-123
=VAL :http://example.com/foo#bar
+SEQ []
=VAL :::vector
=VAL ": - ()
=VAL "Up, up and away!
=VAL :-123
=VAL :http://example.com/foo#bar
-SEQ
-SEQ
-DOC
-STR

Expected JSON

[
"::vector",
": - ()",
"Up, up, and away!",
-123,
"http://example.com/foo#bar",
[
"::vector",
": - ()",
"Up, up and away!",
-123,
"http://example.com/foo#bar"
]
]

c-libfyaml-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-ruamel-event

 ok

rust-yamlrust-event

 ok

c-libfyaml-json

 json_ok

hs-hsyaml-json

 json_ok

js-jsyaml-json

 json_ok

js-yaml-json

 json_ok

perl-pp-json

 json_ok

perl-syck-json

 json_ok

py-ruamel-json

 json_ok

dotnet-yamldotnet-json

 json_diff
[
  "::vector",
  ": - ()",
  "Up, up, and away!",
  "-123",
  "http://example.com/foo#bar",
  [
    "::vector",
    ": - ()",
    "Up, up and away!",
    "-123",
    "http://example.com/foo#bar"
  ]
]

c-libyaml-event

 error
+STR
+DOC
+SEQ
=VAL :::vector
=VAL ": - ()
=VAL :Up, up, and away!
=VAL :-123
=VAL :http://example.com/foo#bar
+SEQ []
Parse error: did not find expected node content

go-yaml-json

 error
yaml: line 7: did not find expected node content

lua-lyaml-json

 error
luajit: 8:3: did not find expected node content
stack traceback:
	[C]: in function 'error'
	/usr/local/share/lua/5.1/lyaml/init.lua:306: in function 'error'
	/usr/local/share/lua/5.1/lyaml/init.lua:325: in function 'parse'
	/usr/local/share/lua/5.1/lyaml/init.lua:443: in function 'load_node'
	/usr/local/share/lua/5.1/lyaml/init.lua:393: in function 'load_node'
	/usr/local/share/lua/5.1/lyaml/init.lua:393: in function 'load_node'
	/usr/local/share/lua/5.1/lyaml/init.lua:497: in function 'load'
	/yaml/bin/lua-lyaml-json:6: in main chunk
	[C]: at 0x557167c70ed0

perl-pplibyaml-json

 error
YAML::PP::LibYAML Error: The problem:

    did not find expected node content

was found at , line: 8, column: 5
while parsing a flow node at line: 8, column: 5

perl-pplibyaml-perl

 error
YAML::PP::LibYAML Error: The problem:

    did not find expected node content

was found at , line: 8, column: 5
while parsing a flow node at line: 8, column: 5

perl-xs-json

 error
YAML::XS::Load Error: The problem:

    did not find expected node content

was found at document: 1, line: 8, column: 5
while parsing a flow node at line: 8, column: 5

perl-xs-perl

 error
YAML::XS::Load Error: The problem:

    did not find expected node content

was found at document: 1, line: 8, column: 5
while parsing a flow node at line: 8, column: 5

perl-yaml-json

 error
YAML Error: Inconsistent indentation level
   Code: YAML_PARSE_ERR_INCONSISTENT_INDENTATION
   Line: 9
   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: 9
   Document: 1
 at /perl5/lib/perl5/YAML/Loader.pm line 804.

py-pyyaml-event

 error
+STR
+DOC
+SEQ
=VAL :::vector
=VAL ": - ()
=VAL :Up, up, and away!
=VAL :-123
=VAL :http://example.com/foo#bar
+SEQ []
Traceback (most recent call last):
  File "/yaml/bin/py-pyyaml-event", line 7, in <module>
    for event in yaml.parse(sys.stdin.read()):
  File "/python/lib/python3.12/site-packages/yaml/__init__.py", line 75, in parse
    while loader.check_event():
          ^^^^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/yaml/parser.py", line 98, in check_event
    self.current_event = self.state()
                         ^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/yaml/parser.py", line 474, in parse_flow_sequence_first_entry
    return self.parse_flow_sequence_entry(first=True)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/yaml/parser.py", line 495, in parse_flow_sequence_entry
    return self.parse_flow_node()
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/yaml/parser.py", line 268, in parse_flow_node
    return self.parse_node()
           ^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/yaml/parser.py", line 369, in parse_node
    raise ParserError("while parsing a %s node" % node, start_mark,
yaml.parser.ParserError: while parsing a flow node
expected the node content, but found ':'
  in "<unicode string>", line 8, column 5:
    - [ ::vector,
        ^

py-pyyaml-json

 error
Traceback (most recent call last):
  File "/yaml/bin/py-pyyaml-json", line 19, in <module>
    for doc in yaml.load_all(sys.stdin.read(), Loader=yaml.FullLoader):
  File "/python/lib/python3.12/site-packages/yaml/__init__.py", line 130, in load_all
    yield loader.get_data()
          ^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/yaml/constructor.py", line 45, in get_data
    return self.construct_document(self.get_node())
                                   ^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/yaml/composer.py", line 27, in get_node
    return self.compose_document()
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/yaml/composer.py", line 55, in compose_document
    node = self.compose_node(None, None)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/yaml/composer.py", line 82, in compose_node
    node = self.compose_sequence_node(anchor)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/yaml/composer.py", line 111, in compose_sequence_node
    node.value.append(self.compose_node(node, index))
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/yaml/composer.py", line 82, in compose_node
    node = self.compose_sequence_node(anchor)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/yaml/composer.py", line 110, in compose_sequence_node
    while not self.check_event(SequenceEndEvent):
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/yaml/parser.py", line 98, in check_event
    self.current_event = self.state()
                         ^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/yaml/parser.py", line 474, in parse_flow_sequence_first_entry
    return self.parse_flow_sequence_entry(first=True)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/yaml/parser.py", line 495, in parse_flow_sequence_entry
    return self.parse_flow_node()
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/yaml/parser.py", line 268, in parse_flow_node
    return self.parse_node()
           ^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/yaml/parser.py", line 369, in parse_node
    raise ParserError("while parsing a %s node" % node, start_mark,
yaml.parser.ParserError: while parsing a flow node
expected the node content, but found ':'
  in "<unicode string>", line 8, column 5:
    - [ ::vector,
        ^

py-pyyaml-py

 error
Traceback (most recent call last):
  File "/yaml/bin/py-pyyaml-py", line 36, in <module>
    for doc in yaml.load_all(sys.stdin.read(), Loader=yaml.FullLoader):
  File "/python/lib/python3.12/site-packages/yaml/__init__.py", line 130, in load_all
    yield loader.get_data()
          ^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/yaml/constructor.py", line 45, in get_data
    return self.construct_document(self.get_node())
                                   ^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/yaml/composer.py", line 27, in get_node
    return self.compose_document()
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/yaml/composer.py", line 55, in compose_document
    node = self.compose_node(None, None)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/yaml/composer.py", line 82, in compose_node
    node = self.compose_sequence_node(anchor)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/yaml/composer.py", line 111, in compose_sequence_node
    node.value.append(self.compose_node(node, index))
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/yaml/composer.py", line 82, in compose_node
    node = self.compose_sequence_node(anchor)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/yaml/composer.py", line 110, in compose_sequence_node
    while not self.check_event(SequenceEndEvent):
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/yaml/parser.py", line 98, in check_event
    self.current_event = self.state()
                         ^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/yaml/parser.py", line 474, in parse_flow_sequence_first_entry
    return self.parse_flow_sequence_entry(first=True)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/yaml/parser.py", line 495, in parse_flow_sequence_entry
    return self.parse_flow_node()
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/yaml/parser.py", line 268, in parse_flow_node
    return self.parse_node()
           ^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/yaml/parser.py", line 369, in parse_node
    raise ParserError("while parsing a %s node" % node, start_mark,
yaml.parser.ParserError: while parsing a flow node
expected the node content, but found ':'
  in "<unicode string>", line 8, column 5:
    - [ ::vector,
        ^

ruby-psych-json

 error
/ruby/gems/psych/lib/psych.rb:458:in `parse': (<unknown>): did not find expected node content while parsing a flow node at line 8 column 5 (Psych::SyntaxError)
	from /ruby/gems/psych/lib/psych.rb:458:in `parse_stream'
	from /ruby/gems/psych/lib/psych.rb:632:in `load_stream'
	from /yaml/bin/ruby-psych-json:6:in `<main>'

hs-reference-yeast

 na
Line  Col Char Byte Token|Content
   1    0    0    0 +COMM|
   1    0    0    0 =SYNX|#
   1    1    1    1 =META|.Outside.flow.collection:
   1   26   26   26 -COMM|
   1   26   26   26 =EOL |\x0a
   2    0   27   27 +DOC |
   2    0   27   27 +NODE|
   2    0   27   27 +SEQ |
   2    0   27   27 =SYNX|-
   2    1   28   28 =WSPC|.
   2    2   29   29 +NODE|
   2    2   29   29 +VAL |
   2    2   29   29 =TEXT|::vector
   2   10   37   37 -VAL |
   2   10   37   37 -NODE|
   2   10   37   37 =EOL |\x0a
   3    0   38   38 =SYNX|-
   3    1   39   39 =WSPC|.
   3    2   40   40 +NODE|
   3    2   40   40 +VAL |
   3    2   40   40 =SYNX|"
   3    3   41   41 =TEXT|:.-.()
   3    9   47   47 =SYNX|"
   3   10   48   48 -VAL |
   3   10   48   48 -NODE|
   3   10   48   48 =EOL |\x0a
   4    0   49   49 =SYNX|-
   4    1   50   50 =WSPC|.
   4    2   51   51 +NODE|
   4    2   51   51 +VAL |
   4    2   51   51 =TEXT|Up,.up,.and.away!
   4   19   68   68 -VAL |
   4   19   68   68 -NODE|
   4   19   68   68 =EOL |\x0a
   5    0   69   69 =SYNX|-
   5    1   70   70 =WSPC|.
   5    2   71   71 +NODE|
   5    2   71   71 +VAL |
   5    2   71   71 =TEXT|-123
   5    6   75   75 -VAL |
   5    6   75   75 -NODE|
   5    6   75   75 =EOL |\x0a
   6    0   76   76 =SYNX|-
   6    1   77   77 =WSPC|.
   6    2   78   78 +NODE|
   6    2   78   78 +VAL |
   6    2   78   78 =TEXT|http://example.com/foo#bar
   6   28  104  104 -VAL |
   6   28  104  104 -NODE|
   6   28  104  104 =EOL |\x0a
   7    0  105  105 +COMM|
   7    0  105  105 =SYNX|#
   7    1  106  106 =META|.Inside.flow.collection:
   7   25  130  130 -COMM|
   7   25  130  130 =EOL |\x0a
   8    0  131  131 =SYNX|-
   8    1  132  132 =WSPC|.
   8    2  133  133 +NODE|
   8    2  133  133 +SEQ |
   8    2  133  133 =SYNX|[
   8    3  134  134 =WSPC|.
   8    4  135  135 +NODE|
   8    4  135  135 +VAL |
   8    4  135  135 =TEXT|::vector
   8   12  143  143 -VAL |
   8   12  143  143 -NODE|
   8   12  143  143 =SYNX|,
   8   13  144  144 =EOL |\x0a
   9    0  145  145 =DENT|.
   9    1  146  146 =WSPC|.
   9    2  147  147 +NODE|
   9    2  147  147 +VAL |
   9    2  147  147 =SYNX|"
   9    3  148  148 =TEXT|:.-.()
   9    9  154  154 =SYNX|"
   9   10  155  155 -VAL |
   9   10  155  155 -NODE|
   9   10  155  155 =SYNX|,
   9   11  156  156 =EOL |\x0a
  10    0  157  157 =DENT|.
  10    1  158  158 =WSPC|.
  10    2  159  159 +NODE|
  10    2  159  159 +VAL |
  10    2  159  159 =SYNX|"
  10    3  160  160 =TEXT|Up,.up.and.away!
  10   19  176  176 =SYNX|"
  10   20  177  177 -VAL |
  10   20  177  177 -NODE|
  10   20  177  177 =SYNX|,
  10   21  178  178 =EOL |\x0a
  11    0  179  179 =DENT|.
  11    1  180  180 =WSPC|.
  11    2  181  181 +NODE|
  11    2  181  181 +VAL |
  11    2  181  181 =TEXT|-123
  11    6  185  185 -VAL |
  11    6  185  185 -NODE|
  11    6  185  185 =SYNX|,
  11    7  186  186 =EOL |\x0a
  12    0  187  187 =DENT|.
  12    1  188  188 =WSPC|.
  12    2  189  189 +NODE|
  12    2  189  189 +VAL |
  12    2  189  189 =TEXT|http://example.com/foo#bar
  12   28  215  215 -VAL |
  12   28  215  215 -NODE|
  12   28  215  215 =WSPC|.
  12   29  216  216 =SYNX|]
  12   30  217  217 -SEQ |
  12   30  217  217 -NODE|
  12   30  217  217 =EOL |\x0a
  13    0  218  218 -SEQ |
  13    0  218  218 -NODE|
  13    0  218  218 -DOC |

perl-pp-perl

 na
[
  '::vector',
  ': - ()',
  'Up, up, and away!',
  -123,
  'http://example.com/foo#bar',
  [
    '::vector',
    ': - ()',
    'Up, up and away!',
    -123,
    'http://example.com/foo#bar'
  ]
]

perl-syck-perl

 na
[
  '::vector',
  ': - ()',
  'Up, up, and away!',
  -123,
  'http://example.com/foo#bar',
  [
    '::vector',
    ': - ()',
    'Up, up and away!',
    -123,
    'http://example.com/foo#bar'
  ]
]

py-ruamel-py

 na
['::vector',
 ': - ()',
 'Up, up, and away!',
 -123,
 'http://example.com/foo#bar',
 ['::vector', ': - ()', 'Up, up and away!', -123, 'http://example.com/foo#bar']]

perl-tiny-json

 ni
YAML::Tiny found bad indenting in line '  ": - ()",' at /yaml/bin/perl-tiny-json line 12.

perl-tiny-perl

 ni
YAML::Tiny found bad indenting in line '  ": - ()",' at /yaml/bin/perl-tiny-perl line 15.