# YAML Test Matrix

--- &test-96NN:00
  Title: Leading tab content in literals
  Tags: [ indent, literal, whitespace ]

YAML

foo: |-
 	bar

Expected Events

+STR
+DOC
+MAP
=VAL :foo
=VAL |\tbar
-MAP
-DOC
-STR

Expected JSON

{
"foo": "\tbar"
}

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-pyyaml-event

 ok

py-ruamel-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

py-pyyaml-json

 json_ok

py-ruamel-json

 json_ok

dotnet-yamldotnet-json

 json_diff
parse error: Invalid string: control characters from U+0000 through U+001F must be escaped at line 1, column 14

perl-tiny-json

 json_diff
{
  "foo": "bar"
}

c-libyaml-event

 error
+STR
+DOC
+MAP
=VAL :foo
Parse error: found a tab character where an indentation space is expected

go-yaml-json

 error
yaml: line 2: found a tab character where an indentation space is expected

lua-lyaml-json

 error
luajit: 1:1: found a tab character where an indentation space is expected
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:378: 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 0x55b41518ced0

perl-pplibyaml-json

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

    found a tab character where an indentation space is expected

was found at , line: 2, column: 2
while scanning a block scalar at line: 1, column: 6

perl-pplibyaml-perl

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

    found a tab character where an indentation space is expected

was found at , line: 2, column: 2
while scanning a block scalar at line: 1, column: 6

perl-xs-json

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

    found a tab character where an indentation space is expected

was found at document: 1, line: 2, column: 2
while scanning a block scalar at line: 1, column: 6

perl-xs-perl

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

    found a tab character where an indentation space is expected

was found at document: 1, line: 2, column: 2
while scanning a block scalar at line: 1, column: 6

ruby-psych-json

 error
/ruby/gems/psych/lib/psych.rb:458:in `parse': (<unknown>): found a tab character where an indentation space is expected while scanning a block scalar at line 1 column 6 (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
+MAP
=VAL :foo
Error: ScanError { mark: Marker { index: 9, line: 2, col: 1 }, info: "while scanning a block scalar, found a tab character where an indentation space is expected" }

hs-reference-yeast

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

perl-pp-perl

 na
{
  'foo' => '	bar'
}

perl-syck-perl

 na
{
  'foo' => '	bar'
}

perl-tiny-perl

 na
{
  'foo' => 'bar'
}

perl-yaml-perl

 na
{
  'foo' => '	bar'
}

py-pyyaml-py

 na
{'foo': '\tbar'}

py-ruamel-py

 na
{'foo': '\tbar'}