# YAML Test Matrix

--- &test-Y79Y:001
  Title: Tabs in various contexts
  Tags: [ whitespace ]

YAML

foo: |
 	
bar: 1

Expected Events

+STR
+DOC
+MAP
=VAL :foo
=VAL |\t\n
=VAL :bar
=VAL :1
-MAP
-DOC
-STR

Expected JSON

{
"bar": 1,
"foo": "\t\n"
}

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

cpp-rapidyaml-event

 diff
Minimal Events:
+STR
+DOC
+MAP
=VAL :foo
=VAL :\t\n
=VAL :bar
=VAL :1
-MAP
-DOC
-STR
Transformed Events:
+STR
+DOC
+MAP
=VAL :foo
=VAL :
=VAL :bar
=VAL :1
-MAP
-DOC
-STR
Got Events:
+STR
+DOC
+MAP
=VAL :foo
=VAL '
=VAL :bar
=VAL :1
-MAP
-DOC
-STR

dotnet-yamldotnet-json

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

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 0x55b007cdaed0

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-tiny-json

 error
YAML::Tiny found bad indenting in line 'bar: 1' at /yaml/bin/perl-tiny-json line 12.

perl-tiny-perl

 error
YAML::Tiny found bad indenting in line 'bar: 1' at /yaml/bin/perl-tiny-perl line 15.

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: 8, 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 =EOL |\x0a
   2    0    7    7 =DENT|.
   2    1    8    8 =TEXT|\x09
   2    2    9    9 =NEWL|\x0a
   3    0   10   10 -VAL |
   3    0   10   10 -NODE|
   3    0   10   10 -PAIR|
   3    0   10   10 +PAIR|
   3    0   10   10 +NODE|
   3    0   10   10 +VAL |
   3    0   10   10 =TEXT|bar
   3    3   13   13 -VAL |
   3    3   13   13 -NODE|
   3    3   13   13 =SYNX|:
   3    4   14   14 =WSPC|.
   3    5   15   15 +NODE|
   3    5   15   15 +VAL |
   3    5   15   15 =TEXT|1
   3    6   16   16 -VAL |
   3    6   16   16 -NODE|
   3    6   16   16 =EOL |\x0a
   4    0   17   17 -PAIR|
   4    0   17   17 -MAP |
   4    0   17   17 -NODE|
   4    0   17   17 -DOC |

perl-pp-perl

 na
{
  'bar' => 1,
  'foo' => '	
'
}

perl-syck-perl

 na
{
  'bar' => 1,
  'foo' => '	
'
}

perl-yaml-perl

 na
{
  'bar' => 1,
  'foo' => '	
'
}

py-pyyaml-py

 na
{'bar': 1, 'foo': '\t\n'}

py-ruamel-py

 na
{'bar': 1, 'foo': '\t\n'}