# YAML Test Matrix

--- &test-HMQ5
  Title: Spec Example 6.23. Node Properties
  Tags: [ alias, spec, tag ]

YAML

!!str &a1 "foo":
  !!str bar
&a2 baz : *a1

Expected Events

+STR
+DOC
+MAP
=VAL &a1 <tag:yaml.org,2002:str> "foo
=VAL <tag:yaml.org,2002:str> :bar
=VAL &a2 :baz
=ALI *a1
-MAP
-DOC
-STR

Expected JSON

{
"foo": "bar",
"baz": "foo"
}

cpp-event

 ok

hs-yaml-event

 ok

java-event

 ok

js-event

 ok

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

perl5-pp-json

 json_ok

perl5-xs-json

 json_ok

pyyaml-json

 json_ok

ruamel-json

 json_ok

ruby-json

 json_ok

js-yaml-json

 error
YAMLException: end of the stream or a document separator is expected at line 1, column 16:
    !!str &a1 "foo":
                   ^
    at generateError (/node_modules/js-yaml/lib/js-yaml/loader.js:165:10)
    at throwError (/node_modules/js-yaml/lib/js-yaml/loader.js:171:9)
    at readDocument (/node_modules/js-yaml/lib/js-yaml/loader.js:1512:5)
    at loadDocuments (/node_modules/js-yaml/lib/js-yaml/loader.js:1548:5)
    at Object.loadAll (/node_modules/js-yaml/lib/js-yaml/loader.js:1556:19)
    at Object.<anonymous> (/bin/js-yaml-json:6:6)
    at Object.<anonymous> (/bin/js-yaml-json:3:1)
    at Module._compile (module.js:652:30)
    at Object.exports.run (/usr/lib/node_modules/coffee-script/lib/coffee-script/coffee-script.js:173:23)
    at compileScript (/usr/lib/node_modules/coffee-script/lib/coffee-script/command.js:224:29)
    at compilePath (/usr/lib/node_modules/coffee-script/lib/coffee-script/command.js:174:14)
    at Object.exports.run (/usr/lib/node_modules/coffee-script/lib/coffee-script/command.js:98:20)
    at Object.<anonymous> (/usr/lib/node_modules/coffee-script/bin/coffee:15:45)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Function.Module.runMain (module.js:693:10)
    at startup (bootstrap_node.js:191:16)
    at bootstrap_node.js:612:3

luajit-json

 error
luajit: invalid reference: a1
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: 2
   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: 2
   Document: 2
 at /lib/perl5/YAML/Loader.pm line 88.

perl5-syck-json

 error
json text or perl structure exceeds maximum nesting level (max_depth set too low?) at /bin/perl5-syck-json line 15.

perl5-tiny-json

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

perl5-tiny-pl

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

perl5-pp-pl

 na
{
  'baz' => 'foo',
  'foo' => 'bar'
}

perl5-syck-pl

 na
{
  'baz' => $VAR1,
  'foo' => 'bar'
}

perl5-xs-pl

 na
{
  'baz' => 'foo',
  'foo' => 'bar'
}

pyyaml-py

 na
{'baz': 'foo', 'foo': 'bar'}

ruamel-py

 na
{'baz': 'foo', 'foo': 'bar'}