# YAML Test Matrix

--- &test-ZH7C
  Title: Anchors in Mapping
  Tags: [ anchor, jayt, mapping ]

YAML

&a a: b
c: &d d

Expected Events

+STR
+DOC
+MAP
=VAL &a :a
=VAL :b
=VAL :c
=VAL &d :d
-MAP
-DOC
-STR

Expected JSON

{
"a": "b",
"c": "d"
}

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

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-syck-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/js-yaml/loader.js:173
  throw generateError(state, message);
  ^
YAMLException: end of the stream or a document separator is expected at line 1, column 5:
    &a a: b
        ^
    at generateError (/node/node_modules/js-yaml/lib/js-yaml/loader.js:167:10)
    at throwError (/node/node_modules/js-yaml/lib/js-yaml/loader.js:173:9)
    at readDocument (/node/node_modules/js-yaml/lib/js-yaml/loader.js:1539:5)
    at loadDocuments (/node/node_modules/js-yaml/lib/js-yaml/loader.js:1575:5)
    at Object.loadAll (/node/node_modules/js-yaml/lib/js-yaml/loader.js:1583: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-pp-perl

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

perl-pplibyaml-perl

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

perl-syck-perl

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

perl-xs-perl

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

perl-yaml-perl

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

py-pyyaml-py

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

py-ruamel-py

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

perl-tiny-json

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

perl-tiny-perl

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