# YAML Test Matrix

--- &test-JS2J
  Title: Spec Example 6.29. Node Anchors
  Tags: [ alias, spec ]

YAML

First occurrence: &anchor Value
Second occurrence: *anchor

Expected Events

+STR
+DOC
+MAP
=VAL :First occurrence
=VAL &anchor :Value
=VAL :Second occurrence
=ALI *anchor
-MAP
-DOC
-STR

Expected JSON

{
"First occurrence": "Value",
"Second occurrence": "Value"
}

c-libfyaml-event

 ok

c-libyaml-event

 ok

cpp-rapidyaml-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

go-yaml-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

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

raku-yamlish-json

 json_ok

ruby-psych-json

 json_ok

hs-reference-yeast

 na
Line  Col Char Byte Token|Content
   1    0    0    0 +DOC |
   1    0    0    0 +NODE|
   1    0    0    0 +MAP |
   1    0    0    0 +PAIR|
   1    0    0    0 +NODE|
   1    0    0    0 +VAL |
   1    0    0    0 =TEXT|First.occurrence
   1   16   16   16 -VAL |
   1   16   16   16 -NODE|
   1   16   16   16 =SYNX|:
   1   17   17   17 =WSPC|.
   1   18   18   18 +NODE|
   1   18   18   18 +PROP|
   1   18   18   18 +ANCH|
   1   18   18   18 =SYNX|&
   1   19   19   19 =META|anchor
   1   25   25   25 -ANCH|
   1   25   25   25 -PROP|
   1   25   25   25 =WSPC|.
   1   26   26   26 +VAL |
   1   26   26   26 =TEXT|Value
   1   31   31   31 -VAL |
   1   31   31   31 -NODE|
   1   31   31   31 =EOL |\x0a
   2    0   32   32 -PAIR|
   2    0   32   32 +PAIR|
   2    0   32   32 +NODE|
   2    0   32   32 +VAL |
   2    0   32   32 =TEXT|Second.occurrence
   2   17   49   49 -VAL |
   2   17   49   49 -NODE|
   2   17   49   49 =SYNX|:
   2   18   50   50 =WSPC|.
   2   19   51   51 +NODE|
   2   19   51   51 +ALI |
   2   19   51   51 =SYNX|*
   2   20   52   52 =META|anchor
   2   26   58   58 -ALI |
   2   26   58   58 -NODE|
   2   26   58   58 =EOL |\x0a
   3    0   59   59 -PAIR|
   3    0   59   59 -MAP |
   3    0   59   59 -NODE|
   3    0   59   59 -DOC |

perl-pp-perl

 na
{
  'First occurrence' => 'Value',
  'Second occurrence' => 'Value'
}

perl-pplibyaml-perl

 na
{
  'First occurrence' => 'Value',
  'Second occurrence' => 'Value'
}

perl-syck-perl

 na
{
  'First occurrence' => 'Value',
  'Second occurrence' => 'Value'
}

perl-xs-perl

 na
{
  'First occurrence' => 'Value',
  'Second occurrence' => ${\$VAR1->{'First occurrence'}}
}

perl-yaml-perl

 na
{
  'First occurrence' => 'Value',
  'Second occurrence' => 'Value'
}

py-pyyaml-py

 na
{'First occurrence': 'Value', 'Second occurrence': 'Value'}

py-ruamel-py

 na
{'First occurrence': 'Value', 'Second occurrence': 'Value'}

raku-yamlish-raku

 na
{
  First occurrence  => "Value".Str,
  Second occurrence => "Value".Str,
}

perl-tiny-json

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

perl-tiny-perl

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