# YAML Test Matrix

--- &test-FP8R
  Title: Zero indented block scalar
  Tags: [ folded, indent, scalar ]

YAML

--- >
line1
line2
line3

Expected Events

+STR
+DOC ---
=VAL >line1 line2 line3\n
-DOC
-STR

Expected JSON

"line1 line2 line3\n"

c-libfyaml-event

 ok

cpp-rapidyaml-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

c-libfyaml-json

 json_ok

dotnet-yamldotnet-json

 json_ok

hs-hsyaml-json

 json_ok

js-yaml-json

 json_ok

perl-pp-json

 json_ok

perl-syck-json

 json_ok

perl-tiny-json

 json_ok

perl-yaml-json

 json_ok

py-ruamel-json

 json_ok

cpp-yamlcpp-event

 diff
Minimal Events:
+STR
+DOC
=VAL :line1 line2 line3\n
-DOC
-STR
Transformed Events:
+STR
+DOC
=VAL :
-DOC
+DOC
=VAL :line1 line2 line3
-DOC
-STR
Got Events:
+STR
+DOC
=VAL :
-DOC
+DOC
=VAL :line1 line2 line3
-DOC
-STR

js-jsyaml-json

 json_diff
"line1 line2 line3 "

c-libyaml-event

 error
+STR
+DOC ---
=VAL >
-DOC
Parse error: did not find expected <document start>

go-yaml-json

 error
""
yaml: line 1: did not find expected <document start>

lua-lyaml-json

 error
luajit: 2:1: did not find expected <document start>
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 0x555702e93ed0

perl-pplibyaml-json

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

    did not find expected <document start>

was found at , line: 2, column: 1

perl-pplibyaml-perl

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

    did not find expected <document start>

was found at , line: 2, column: 1

perl-xs-json

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

    did not find expected <document start>

was found at document: 2, line: 2, column: 1

perl-xs-perl

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

    did not find expected <document start>

was found at document: 2, line: 2, column: 1

py-pyyaml-event

 error
+STR
+DOC ---
=VAL >
-DOC
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 171, in parse_document_start
    raise ParserError(None, None,
yaml.parser.ParserError: expected '<document start>', but found '<scalar>'
  in "<unicode string>", line 2, column 1:
    line1
    ^

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 18, in check_node
    if self.check_event(StreamStartEvent):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  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 171, in parse_document_start
    raise ParserError(None, None,
yaml.parser.ParserError: expected '<document start>', but found '<scalar>'
  in "<unicode string>", line 2, column 1:
    line1
    ^

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 18, in check_node
    if self.check_event(StreamStartEvent):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  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 171, in parse_document_start
    raise ParserError(None, None,
yaml.parser.ParserError: expected '<document start>', but found '<scalar>'
  in "<unicode string>", line 2, column 1:
    line1
    ^

ruby-psych-json

 error
/ruby/gems/psych/lib/psych.rb:458:in `parse': (<unknown>): did not find expected <document start> at line 1 column 1 (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 >
-DOC
Error: ScanError { mark: Marker { index: 6, line: 2, col: 0 }, info: "did not find expected <document start>" }

hs-reference-yeast

 na
Line  Col Char Byte Token|Content
   1    0    0    0 +DOC |
   1    0    0    0 =HEAD|---
   1    3    3    3 +NODE|
   1    3    3    3 =WSPC|.
   1    4    4    4 +VAL |
   1    4    4    4 =SYNX|>
   1    5    5    5 =EOL |\x0a
   2    0    6    6 =TEXT|line1
   2    5   11   11 =FOLD|\x0a
   3    0   12   12 =TEXT|line2
   3    5   17   17 =FOLD|\x0a
   4    0   18   18 =TEXT|line3
   4    5   23   23 =NEWL|\x0a
   5    0   24   24 -VAL |
   5    0   24   24 -NODE|
   5    0   24   24 -DOC |

perl-pp-perl

 na
'line1 line2 line3
'

perl-syck-perl

 na
'line1 line2 line3
'

perl-tiny-perl

 na
'line1 line2 line3
'

perl-yaml-perl

 na
'line1 line2 line3
'

py-ruamel-py

 na
'line1 line2 line3\n'