# YAML Test Matrix

--- &test-R4YG
  Title: Spec Example 8.2. Block Indentation Indicator
  Tags: [ folded, libyaml-err, literal, scalar, spec, upto-1.2, whitespace ]

YAML

- |
 detected
- >
 
  
  # detected
- |1
  explicit
- >
 	
 detected

Expected Events

+STR
+DOC
+SEQ
=VAL |detected\n
=VAL >\n\n# detected\n
=VAL | explicit\n
=VAL >\t\ndetected\n
-SEQ
-DOC
-STR

Expected JSON

[
"detected\n",
"\n\n# detected\n",
" explicit\n",
"\t\ndetected\n"
]

c-libfyaml-event

 ok

cpp-rapidyaml-event

 ok

cpp-yamlcpp-event

 ok

dotnet-yamldotnet-event

 ok

hs-hsyaml-event

 ok

java-snakeengine-event

 ok

java-snakeyaml-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

java-snakeengine-json

 json_ok

java-snakeyaml-json

 json_ok

js-jsyaml-json

 json_ok

js-yaml-json

 json_ok

perl-pp-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 65

perl-syck-json

 json_diff
[
  "detected\n",
  "\n\n# detected\n",
  " explicit\n",
  "\t detected\n"
]

perl-yaml-json

 json_diff
[
  "detected\n",
  "\n \n # detected\n",
  " explicit\n",
  "\t\ndetected\n"
]

c-libyaml-event

 error
+STR
+DOC
+SEQ
=VAL |detected\n
=VAL >\n\n# detected\n
=VAL | explicit\n
Parse error: found a tab character where an indentation space is expected

go-yaml-json

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

lua-lyaml-json

 error
luajit: 7:3: 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: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 0x555fa9960f97

perl-pplibyaml-json

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

    found a tab character where an indentation space is expected

was found at , line: 10, column: 2
while scanning a block scalar at line: 9, column: 3

perl-pplibyaml-perl

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

    found a tab character where an indentation space is expected

was found at , line: 10, column: 2
while scanning a block scalar at line: 9, column: 3

perl-tiny-json

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

perl-tiny-perl

 error
YAML::Tiny found bad indenting in line '- |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: 10, column: 2
while scanning a block scalar at line: 9, column: 3

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: 10, column: 2
while scanning a block scalar at line: 9, column: 3

raku-yamlish-json

 error
Couldn't parse YAML
  in sub load-yamls at /raku/sources/44795C7AB0F35700F4CA9C3E2CC5C924EE4C608F (YAMLish) line 959
  in block <unit> at /yaml/bin/raku-yamlish-json line 6

raku-yamlish-raku

 error
Couldn't parse YAML
  in sub load-yamls at /raku/sources/44795C7AB0F35700F4CA9C3E2CC5C924EE4C608F (YAMLish) line 959
  in block <unit> at /yaml/bin/raku-yamlish-raku line 6

ruby-psych-json

 error
/ruby/gems/psych/lib/psych.rb:459:in `parse': (<unknown>): found a tab character where an indentation space is expected while scanning a block scalar at line 9 column 3 (Psych::SyntaxError)
	from /ruby/gems/psych/lib/psych.rb:459:in `parse_stream'
	from /ruby/gems/psych/lib/psych.rb:565:in `load_stream'
	from /yaml/bin/ruby-psych-json:6:in `<main>'

rust-yamlrust-event

 error
+STR
+DOC
+SEQ
=VAL |detected\n
=VAL >\n\n# detected\n
=VAL | explicit\n
Error: ScanError { mark: Marker { index: 57, line: 10, 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 +SEQ |
   1    0    0    0 =SYNX|-
   1    1    1    1 +NODE|
   1    1    1    1 =WSPC|.
   1    2    2    2 +VAL |
   1    2    2    2 =SYNX||
   1    3    3    3 =EOL |\x0a
   2    0    4    4 =DENT|.
   2    1    5    5 =TEXT|detected
   2    9   13   13 =NEWL|\x0a
   3    0   14   14 -VAL |
   3    0   14   14 -NODE|
   3    0   14   14 =SYNX|-
   3    1   15   15 +NODE|
   3    1   15   15 =WSPC|.
   3    2   16   16 +VAL |
   3    2   16   16 =SYNX|>
   3    3   17   17 =EOL |\x0a
   4    0   18   18 =DENT|.
   4    1   19   19 =NEWL|\x0a
   5    0   20   20 =DENT|.
   5    1   21   21 =TEXT|.
   5    2   22   22 =NEWL|\x0a
   6    0   23   23 =DENT|.
   6    1   24   24 =TEXT|.#.detected
   6   12   35   35 =NEWL|\x0a
   7    0   36   36 -VAL |
   7    0   36   36 -NODE|
   7    0   36   36 =SYNX|-
   7    1   37   37 +NODE|
   7    1   37   37 =WSPC|.
   7    2   38   38 +VAL |
   7    2   38   38 =SYNX||
   7    3   39   39 =SYNX|1
   7    4   40   40 =EOL |\x0a
   8    0   41   41 =DENT|.
   8    1   42   42 =TEXT|.explicit
   8   10   51   51 =NEWL|\x0a
   9    0   52   52 -VAL |
   9    0   52   52 -NODE|
   9    0   52   52 =SYNX|-
   9    1   53   53 +NODE|
   9    1   53   53 =WSPC|.
   9    2   54   54 +VAL |
   9    2   54   54 =SYNX|>
   9    3   55   55 =EOL |\x0a
  10    0   56   56 =DENT|.
  10    1   57   57 =TEXT|\x09
  10    2   58   58 =NEWL|\x0a
  11    0   59   59 =DENT|.
  11    1   60   60 =TEXT|detected
  11    9   68   68 =NEWL|\x0a
  12    0   69   69 -VAL |
  12    0   69   69 -NODE|
  12    0   69   69 -SEQ |
  12    0   69   69 -NODE|
  12    0   69   69 -DOC |

perl-pp-perl

 na
[
  'detected
',
  '

# detected
',
  ' explicit
',
  '	
detected
'
]

perl-syck-perl

 na
[
  'detected
',
  '

# detected
',
  ' explicit
',
  '	 detected
'
]

perl-yaml-perl

 na
[
  'detected
',
  '
 
 # detected
',
  ' explicit
',
  '	
detected
'
]

py-pyyaml-py

 na
['detected\n', '\n\n# detected\n', ' explicit\n', '\t\ndetected\n']

py-ruamel-py

 na
['detected\n', '\n\n# detected\n', ' explicit\n', '\t\ndetected\n']