# YAML Test Matrix

--- &test-6ZKB
  Title: Spec Example 9.6. Stream
  Tags: [ 1.3-err, header, spec ]

YAML

Document
---
# Empty
...
%YAML 1.2
---
matches %: 20

Expected Events

+STR
+DOC
=VAL :Document
-DOC
+DOC ---
=VAL :
-DOC ...
+DOC ---
+MAP
=VAL :matches %
=VAL :20
-MAP
-DOC
-STR

Expected JSON

"Document"
null
{
"matches %": 20
}

cpp-event

 ok

hs-yaml-event

 ok

java-event

 ok

js-event

 ok

nimyaml-event

 ok

perl5-pp-event

 ok

pyyaml-event

 ok

ruamel-event

 ok

hs-yaml-json

 json_ok

java-json

 json_ok

js-json

 json_ok

js-yaml-json

 json_ok

perl5-pp-json

 json_ok

pyyaml-json

 json_ok

ruamel-json

 json_ok

perl5-syck-json

 json_diff
{
  "Document --- # Empty ... %YAML 1.2 --- matches %": 20
}

libyaml-event

 error
+STR
+DOC
=VAL :Document
-DOC
+DOC ---
=VAL :
-DOC ...
Parse error: found incompatible YAML document

luajit-json

 error
luajit: found incompatible YAML document at document: 2, line: 5, column: 1

stack traceback:
	[C]: in function 'load'
	/bin/luajit-json:6: in main chunk
	[C]: at 0x004044a0

perl5-pegex-event

 error
Maximum parsing rules reached (1000)

perl5-pm-json

 error
YAML Error: Expected separator '---'
   Code: YAML_PARSE_ERR_NO_SEPARATOR
   Line: 1
   Document: 2
 at /lib/perl5/YAML/Loader.pm line 88.

perl5-pm-pl

 error
YAML Error: Expected separator '---'
   Code: YAML_PARSE_ERR_NO_SEPARATOR
   Line: 1
   Document: 2
 at /lib/perl5/YAML/Loader.pm line 88.

perl5-tiny-json

 error
YAML::Tiny failed to classify line 'Document' at /bin/perl5-tiny-json line 12.

perl5-tiny-pl

 error
YAML::Tiny failed to classify line 'Document' at /bin/perl5-tiny-pl line 15.

perl5-xs-json

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

    found incompatible YAML document

was found at document: 3, line: 5, column: 1

perl5-xs-pl

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

    found incompatible YAML document

was found at document: 3, line: 5, column: 1

ruby-json

 error
/usr/lib/ruby/2.3.0/psych.rb:380:in `parse': (<unknown>): found incompatible YAML document at line 1 column 1 (Psych::SyntaxError)
	from /usr/lib/ruby/2.3.0/psych.rb:380:in `parse_stream'
	from /usr/lib/ruby/2.3.0/psych.rb:463:in `load_stream'
	from /bin/ruby-json:6:in `<main>'

perl5-pp-pl

 na
'Document'
undef
{
  'matches %' => 20
}

perl5-syck-pl

 na
{
  'Document --- # Empty ... %YAML 1.2 --- matches %' => 20
}

pyyaml-py

 na
'Document'
None
{'matches %': 20}

ruamel-py

 na
'Document'
None
{'matches %': 20}