# YAML Test Matrix

--- &test-DK95:03
  Title: Tabs that look like indentation
  Tags: [ indent, whitespace ]

YAML

 	
foo: 1

Expected Events

+STR
+DOC
+MAP
=VAL :foo
=VAL :1
-MAP
-DOC
-STR

Expected JSON

{
"foo": 1
}

c-libfyaml-event

 ok

cpp-rapidyaml-event

 ok

cpp-yamlcpp-event

 ok

dotnet-yamldotnet-event

 ok

hs-hsyaml-event

 ok

js-yaml-event

 ok

perl-pp-event

 ok

perl-refparser-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

perl-yaml-json

 json_ok

dotnet-yamldotnet-json

 json_diff
{
  "foo": "1"
}

perl-tiny-json

 json_diff
{
  "foo": "1"
}

c-libyaml-event

 error
+STR
Parse error: found character that cannot start any token

go-yaml-json

 error
yaml: found character that cannot start any token

lua-lyaml-json

 error
luajit: 1:1: found character that cannot start any token
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:496: in function 'load'
	/yaml/bin/lua-lyaml-json:6: in main chunk
	[C]: at 0x56351cbe9ed0

nim-nimyaml-event

 error
+STR
+DOC
/tmp/NimYAML-0.16.0/yaml/stream.nim(134) nimyaml_event
/tmp/NimYAML-0.16.0/yaml/stream.nim(106) next
Error: unhandled exception: Unexpected token (expected collection start): Indentation [YamlStreamError]

perl-pplibyaml-json

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

    found character that cannot start any token

was found at , line: 1, column: 2
while scanning for the next token at line: 1, column: 2

perl-pplibyaml-perl

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

    found character that cannot start any token

was found at , line: 1, column: 2
while scanning for the next token at line: 1, column: 2

perl-xs-json

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

    found character that cannot start any token

was found at document: 1, line: 1, column: 2
while scanning for the next token at line: 1, column: 2

perl-xs-perl

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

    found character that cannot start any token

was found at document: 1, line: 1, column: 2
while scanning for the next token at line: 1, column: 2

py-pyyaml-event

 error
+STR
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 142, in parse_implicit_document_start
    if not self.check_token(DirectiveToken, DocumentStartToken,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/yaml/scanner.py", line 116, in check_token
    self.fetch_more_tokens()
  File "/python/lib/python3.12/site-packages/yaml/scanner.py", line 258, in fetch_more_tokens
    raise ScannerError("while scanning for the next token", None,
yaml.scanner.ScannerError: while scanning for the next token
found character '\t' that cannot start any token
  in "<unicode string>", line 1, column 2:
     	
     ^

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 129, in load_all
    while loader.check_data():
          ^^^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/yaml/constructor.py", line 32, in check_data
    return self.check_node()
           ^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/yaml/composer.py", line 22, in check_node
    return not self.check_event(StreamEndEvent)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  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 142, in parse_implicit_document_start
    if not self.check_token(DirectiveToken, DocumentStartToken,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/yaml/scanner.py", line 116, in check_token
    self.fetch_more_tokens()
  File "/python/lib/python3.12/site-packages/yaml/scanner.py", line 258, in fetch_more_tokens
    raise ScannerError("while scanning for the next token", None,
yaml.scanner.ScannerError: while scanning for the next token
found character '\t' that cannot start any token
  in "<unicode string>", line 1, column 2:
     	
     ^

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 129, in load_all
    while loader.check_data():
          ^^^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/yaml/constructor.py", line 32, in check_data
    return self.check_node()
           ^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/yaml/composer.py", line 22, in check_node
    return not self.check_event(StreamEndEvent)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  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 142, in parse_implicit_document_start
    if not self.check_token(DirectiveToken, DocumentStartToken,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/yaml/scanner.py", line 116, in check_token
    self.fetch_more_tokens()
  File "/python/lib/python3.12/site-packages/yaml/scanner.py", line 258, in fetch_more_tokens
    raise ScannerError("while scanning for the next token", None,
yaml.scanner.ScannerError: while scanning for the next token
found character '\t' that cannot start any token
  in "<unicode string>", line 1, column 2:
     	
     ^

py-ruamel-event

 error
+STR
Traceback (most recent call last):
  File "/yaml/bin/py-ruamel-event", line 9, in <module>
    for event in yaml.parse(sys.stdin.read()):
  File "/python/lib/python3.12/site-packages/ruamel/yaml/main.py", line 371, in parse
    while parser.check_event():
          ^^^^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/ruamel/yaml/parser.py", line 141, in check_event
    self.current_event = self.state()
                         ^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/ruamel/yaml/parser.py", line 187, in parse_implicit_document_start
    if not self.scanner.check_token(DirectiveToken, DocumentStartToken, StreamEndToken):
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/ruamel/yaml/scanner.py", line 170, in check_token
    self.fetch_more_tokens()
  File "/python/lib/python3.12/site-packages/ruamel/yaml/scanner.py", line 313, in fetch_more_tokens
    raise ScannerError(
ruamel.yaml.scanner.ScannerError: while scanning for the next token
found character '\t' that cannot start any token
  in "<unicode string>", line 1, column 2:
     	
     ^ (line: 1)

py-ruamel-json

 error
Traceback (most recent call last):
  File "/yaml/bin/py-ruamel-json", line 21, in <module>
    for doc in yaml.load_all(sys.stdin.read()):
  File "/python/lib/python3.12/site-packages/ruamel/yaml/main.py", line 475, in load_all
    while constructor.check_data():
          ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/ruamel/yaml/constructor.py", line 105, in check_data
    return self.composer.check_node()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/ruamel/yaml/composer.py", line 58, in check_node
    return not self.parser.check_event(StreamEndEvent)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/ruamel/yaml/parser.py", line 141, in check_event
    self.current_event = self.state()
                         ^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/ruamel/yaml/parser.py", line 187, in parse_implicit_document_start
    if not self.scanner.check_token(DirectiveToken, DocumentStartToken, StreamEndToken):
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/ruamel/yaml/scanner.py", line 170, in check_token
    self.fetch_more_tokens()
  File "/python/lib/python3.12/site-packages/ruamel/yaml/scanner.py", line 313, in fetch_more_tokens
    raise ScannerError(
ruamel.yaml.scanner.ScannerError: while scanning for the next token
found character '\t' that cannot start any token
  in "<unicode string>", line 1, column 2:
     	
     ^ (line: 1)

py-ruamel-py

 error
Traceback (most recent call last):
  File "/yaml/bin/py-ruamel-py", line 38, in <module>
    for doc in yaml.load_all(sys.stdin.read()):
  File "/python/lib/python3.12/site-packages/ruamel/yaml/main.py", line 475, in load_all
    while constructor.check_data():
          ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/ruamel/yaml/constructor.py", line 105, in check_data
    return self.composer.check_node()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/ruamel/yaml/composer.py", line 58, in check_node
    return not self.parser.check_event(StreamEndEvent)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/ruamel/yaml/parser.py", line 141, in check_event
    self.current_event = self.state()
                         ^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/ruamel/yaml/parser.py", line 187, in parse_implicit_document_start
    if not self.scanner.check_token(DirectiveToken, DocumentStartToken, StreamEndToken):
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/ruamel/yaml/scanner.py", line 170, in check_token
    self.fetch_more_tokens()
  File "/python/lib/python3.12/site-packages/ruamel/yaml/scanner.py", line 313, in fetch_more_tokens
    raise ScannerError(
ruamel.yaml.scanner.ScannerError: while scanning for the next token
found character '\t' that cannot start any token
  in "<unicode string>", line 1, column 2:
     	
     ^ (line: 1)

ruby-psych-json

 error
/ruby/gems/psych/lib/psych.rb:458:in `parse': (<unknown>): found character that cannot start any token while scanning for the next token at line 1 column 2 (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>'

rust-yamlrust-event

 error
+STR
+DOC
=VAL : foo
Error: ScanError { mark: Marker { index: 6, line: 2, col: 3 }, info: "mapping values are not allowed in this context" }

hs-reference-yeast

 na
Line  Col Char Byte Token|Content
   1    0    0    0 =WSPC|.\x09
   1    2    2    2 =EOL |\x0a
   2    0    3    3 +DOC |
   2    0    3    3 +NODE|
   2    0    3    3 +MAP |
   2    0    3    3 +PAIR|
   2    0    3    3 +NODE|
   2    0    3    3 +VAL |
   2    0    3    3 =TEXT|foo
   2    3    6    6 -VAL |
   2    3    6    6 -NODE|
   2    3    6    6 =SYNX|:
   2    4    7    7 =WSPC|.
   2    5    8    8 +NODE|
   2    5    8    8 +VAL |
   2    5    8    8 =TEXT|1
   2    6    9    9 -VAL |
   2    6    9    9 -NODE|
   2    6    9    9 =EOL |\x0a
   3    0   10   10 -PAIR|
   3    0   10   10 -MAP |
   3    0   10   10 -NODE|
   3    0   10   10 -DOC |

perl-pp-perl

 na
{
  'foo' => 1
}

perl-syck-perl

 na
{
  'foo' => 1
}

perl-tiny-perl

 na
{
  'foo' => '1'
}

perl-yaml-perl

 na
{
  'foo' => 1
}