# YAML Test Matrix

--- &test-RTP8
  Title: Spec Example 9.2. Document Markers
  Tags: [ footer, header, spec ]

YAML

%YAML 1.2
---
Document
... # Suffix

Expected Events

+STR
+DOC ---
=VAL :Document
-DOC ...
-STR

Expected JSON

"Document"

c-libfyaml-event

 ok

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

rust-yamlrust-event

 ok

c-libfyaml-json

 json_ok

dotnet-yamldotnet-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

perl-pplibyaml-json

 json_ok

perl-xs-json

 json_ok

py-pyyaml-json

 json_ok

py-ruamel-json

 json_ok

cpp-rapidyaml-event

 diff
Minimal Events:
+STR
+DOC ---
=VAL :Document
-DOC ...
-STR
Transformed Events:
+STR
+DOC ---
=VAL :Document
-DOC
-STR
Got Events:
+STR
+DOC ---
=VAL :Document
-DOC
-STR

perl-syck-json

 json_diff
"%YAML 1.2 --- Document ..."

go-yaml-json

 error
yaml: found incompatible YAML document

lua-lyaml-json

 error
luajit: 1:1: found incompatible YAML document
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 0x5565430d4f97

perl-tiny-json

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

perl-tiny-perl

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

perl-yaml-json

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

perl-yaml-perl

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

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 incompatible YAML document at line 1 column 1 (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>'

hs-reference-yeast

 na
Line  Col Char Byte Token|Content
   1    0    0    0 +DOC |
   1    0    0    0 +DIR |
   1    0    0    0 =SYNX|%
   1    1    1    1 =META|YAML
   1    5    5    5 =WSPC|.
   1    6    6    6 =META|1.2
   1    9    9    9 -DIR |
   1    9    9    9 =EOL |\x0a
   2    0   10   10 =HEAD|---
   2    3   13   13 =EOL |\x0a
   3    0   14   14 +NODE|
   3    0   14   14 +VAL |
   3    0   14   14 =TEXT|Document
   3    8   22   22 -VAL |
   3    8   22   22 -NODE|
   3    8   22   22 =EOL |\x0a
   4    0   23   23 -DOC |
   4    0   23   23 =FOOT|...
   4    3   26   26 =WSPC|.
   4    4   27   27 +COMM|
   4    4   27   27 =SYNX|#
   4    5   28   28 =META|.Suffix
   4   12   35   35 -COMM|
   4   12   35   35 =EOL |\x0a

perl-pp-perl

 na
'Document'

perl-pplibyaml-perl

 na
'Document'

perl-syck-perl

 na
'%YAML 1.2 --- Document ...'

perl-xs-perl

 na
'Document'

py-pyyaml-py

 na
'Document'

py-ruamel-py

 na
'Document'