# 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

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>

java-snakeyaml-event

 error
Exception in thread "main" expected '<document start>', but found '<scalar>'
 in 'reader', line 2, column 1:
    line1
    ^

	at org.yaml.snakeyaml.parser.ParserImpl$ParseDocumentStart.produce(ParserImpl.java:256)
	at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:165)
	at org.yaml.snakeyaml.Yaml$3.hasNext(Yaml.java:677)
	at org.yaml.editor.Snake2Events.yamlToEvents(Snake2Events.java:111)
	at org.yaml.editor.Snake2Events.main(Snake2Events.java:119)

java-snakeyaml-json

 error
""
Exception in thread "main" expected '<document start>', but found '<scalar>'
 in 'reader', line 2, column 1:
    line1
    ^

	at org.yaml.snakeyaml.parser.ParserImpl$ParseDocumentStart.produce(ParserImpl.java:256)
	at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:165)
	at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:155)
	at org.yaml.snakeyaml.composer.Composer.checkNode(Composer.java:89)
	at org.yaml.snakeyaml.constructor.BaseConstructor.checkData(BaseConstructor.java:124)
	at org.yaml.snakeyaml.Yaml$1.hasNext(Yaml.java:509)
	at org.yaml.editor.Snake2Json.yamlToJson(Snake2Json.java:18)
	at org.yaml.editor.Snake2Json.main(Snake2Json.java:25)

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

perl-pplibyaml-event

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

    did not find expected <document start>

was found at , line: 2, column: 1

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.7/site-packages/yaml/__init__.py", line 75, in parse
    while loader.check_event():
  File "/python/lib/python3.7/site-packages/yaml/parser.py", line 98, in check_event
    self.current_event = self.state()
  File "/python/lib/python3.7/site-packages/yaml/parser.py", line 174, in parse_document_start
    self.peek_token().start_mark)
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.7/site-packages/yaml/__init__.py", line 129, in load_all
    while loader.check_data():
  File "/python/lib/python3.7/site-packages/yaml/constructor.py", line 32, in check_data
    return self.check_node()
  File "/python/lib/python3.7/site-packages/yaml/composer.py", line 18, in check_node
    if self.check_event(StreamStartEvent):
  File "/python/lib/python3.7/site-packages/yaml/parser.py", line 98, in check_event
    self.current_event = self.state()
  File "/python/lib/python3.7/site-packages/yaml/parser.py", line 174, in parse_document_start
    self.peek_token().start_mark)
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.7/site-packages/yaml/__init__.py", line 129, in load_all
    while loader.check_data():
  File "/python/lib/python3.7/site-packages/yaml/constructor.py", line 32, in check_data
    return self.check_node()
  File "/python/lib/python3.7/site-packages/yaml/composer.py", line 18, in check_node
    if self.check_event(StreamStartEvent):
  File "/python/lib/python3.7/site-packages/yaml/parser.py", line 98, in check_event
    self.current_event = self.state()
  File "/python/lib/python3.7/site-packages/yaml/parser.py", line 174, in parse_document_start
    self.peek_token().start_mark)
yaml.parser.ParserError: expected '<document start>', but found '<scalar>'
  in "<unicode string>", line 2, column 1:
    line1
    ^

ruby-psych-json

 error
/usr/lib/ruby/2.5.0/psych.rb:405:in `parse': (<unknown>): did not find expected <document start> at line 1 column 1 (Psych::SyntaxError)
	from /usr/lib/ruby/2.5.0/psych.rb:405:in `parse_stream'
	from /usr/lib/ruby/2.5.0/psych.rb:488:in `load_stream'
	from /yaml/bin/ruby-psych-json:6:in `<main>'

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'