# YAML Test Matrix

--- &test-E76Z
  Title: Aliases in Implicit Block Mapping
  Tags: [ alias, mapping ]

YAML

&a a: &b b
*b : *a

Expected Events

+STR
+DOC
+MAP
=VAL &a :a
=VAL &b :b
=ALI *b
=ALI *a
-MAP
-DOC
-STR

Expected JSON

{
"a": "b",
"b": "a"
}

c-libfyaml-event

 ok

c-libyaml-event

 ok

cpp-yamlcpp-event

 ok

dotnet-yamldotnet-event

 ok

hs-hsyaml-event

 ok

java-snakeyaml-event

 ok

js-yaml-event

 ok

nim-nimyaml-event

 ok

perl-pp-event

 ok

perl-pplibyaml-event

 ok

perl-refparser-event

 ok

py-pyyaml-event

 ok

py-ruamel-event

 ok

c-libfyaml-json

 json_ok

dotnet-yamldotnet-json

 json_ok

hs-hsyaml-json

 json_ok

java-snakeyaml-json

 json_ok

js-yaml-json

 json_ok

lua-lyaml-json

 json_ok

perl-pp-json

 json_ok

perl-pplibyaml-json

 json_ok

perl-xs-json

 json_ok

perl-yaml-json

 json_ok

py-pyyaml-json

 json_ok

py-ruamel-json

 json_ok

ruby-psych-json

 json_ok

js-jsyaml-json

 error
/node/node_modules/js-yaml/lib/loader.js:187
  throw generateError(state, message);
  ^
YAMLException: end of the stream or a document separator is expected (1:5)

 1 | &a a: &b b
---------^
 2 | *b : *a
    at generateError (/node/node_modules/js-yaml/lib/loader.js:183:10)
    at throwError (/node/node_modules/js-yaml/lib/loader.js:187:9)
    at readDocument (/node/node_modules/js-yaml/lib/loader.js:1645:5)
    at loadDocuments (/node/node_modules/js-yaml/lib/loader.js:1688:5)
    at Object.loadAll (/node/node_modules/js-yaml/lib/loader.js:1701:19)
    at Object.<anonymous> (/yaml/bin/js-jsyaml-json:7:13)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)

perl-syck-json

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

perl-pp-perl

 na
{
  'a' => 'b',
  'b' => 'a'
}

perl-pplibyaml-perl

 na
{
  'a' => 'b',
  'b' => 'a'
}

perl-syck-perl

 na
{
  'a' => 'b',
  'b' => $VAR1
}

perl-xs-perl

 na
{
  'a' => 'b',
  'b' => 'a'
}

perl-yaml-perl

 na
{
  'a' => 'b',
  'b' => 'a'
}

py-pyyaml-py

 na
{'a': 'b', 'b': 'a'}

py-ruamel-py

 na
{'a': 'b', 'b': 'a'}

perl-tiny-json

 ni
YAML::Tiny does not support a feature in line '&b b' at /yaml/bin/perl-tiny-json line 12.

perl-tiny-perl

 ni
YAML::Tiny does not support a feature in line '&b b' at /yaml/bin/perl-tiny-perl line 15.