# YAML Test Matrix

--- &test-7BUB
  Title: Spec Example 2.10. Node for “Sammy Sosa” appears twice in this document
  Tags: [ alias, mapping, sequence, spec ]

YAML

---
hr:
  - Mark McGwire
  # Following node labeled SS
  - &SS Sammy Sosa
rbi:
  - *SS # Subsequent occurrence
  - Ken Griffey

Expected Events

+STR
+DOC ---
+MAP
=VAL :hr
+SEQ
=VAL :Mark McGwire
=VAL &SS :Sammy Sosa
-SEQ
=VAL :rbi
+SEQ
=ALI *SS
=VAL :Ken Griffey
-SEQ
-MAP
-DOC
-STR

Expected JSON

{
"hr": [
"Mark McGwire",
"Sammy Sosa"
],
"rbi": [
"Sammy Sosa",
"Ken Griffey"
]
}

c-libfyaml-event

 ok

c-libyaml-event

 ok

cpp-rapidyaml-event

 ok

cpp-yamlcpp-event

 ok

dotnet-yamldotnet-event

 ok

hs-hsyaml-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

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

ruby-psych-json

 json_ok

hs-reference-yeast

 na
Line  Col Char Byte Token|Content
   1    0    0    0 +DOC |
   1    0    0    0 =HEAD|---
   1    3    3    3 +NODE|
   1    3    3    3 =EOL |\x0a
   2    0    4    4 +MAP |
   2    0    4    4 +PAIR|
   2    0    4    4 +NODE|
   2    0    4    4 +VAL |
   2    0    4    4 =TEXT|hr
   2    2    6    6 -VAL |
   2    2    6    6 -NODE|
   2    2    6    6 =SYNX|:
   2    3    7    7 +NODE|
   2    3    7    7 =EOL |\x0a
   3    0    8    8 +SEQ |
   3    0    8    8 =DENT|..
   3    2   10   10 =SYNX|-
   3    3   11   11 =WSPC|.
   3    4   12   12 +NODE|
   3    4   12   12 +VAL |
   3    4   12   12 =TEXT|Mark.McGwire
   3   16   24   24 -VAL |
   3   16   24   24 -NODE|
   3   16   24   24 =EOL |\x0a
   4    0   25   25 =WSPC|..
   4    2   27   27 +COMM|
   4    2   27   27 =SYNX|#
   4    3   28   28 =META|.Following.node.labeled.SS
   4   29   54   54 -COMM|
   4   29   54   54 =EOL |\x0a
   5    0   55   55 =DENT|..
   5    2   57   57 =SYNX|-
   5    3   58   58 =WSPC|.
   5    4   59   59 +NODE|
   5    4   59   59 +PROP|
   5    4   59   59 +ANCH|
   5    4   59   59 =SYNX|&
   5    5   60   60 =META|SS
   5    7   62   62 -ANCH|
   5    7   62   62 -PROP|
   5    7   62   62 =WSPC|.
   5    8   63   63 +VAL |
   5    8   63   63 =TEXT|Sammy.Sosa
   5   18   73   73 -VAL |
   5   18   73   73 -NODE|
   5   18   73   73 =EOL |\x0a
   6    0   74   74 -SEQ |
   6    0   74   74 -NODE|
   6    0   74   74 -PAIR|
   6    0   74   74 +PAIR|
   6    0   74   74 +NODE|
   6    0   74   74 +VAL |
   6    0   74   74 =TEXT|rbi
   6    3   77   77 -VAL |
   6    3   77   77 -NODE|
   6    3   77   77 =SYNX|:
   6    4   78   78 +NODE|
   6    4   78   78 =EOL |\x0a
   7    0   79   79 +SEQ |
   7    0   79   79 =DENT|..
   7    2   81   81 =SYNX|-
   7    3   82   82 =WSPC|.
   7    4   83   83 +NODE|
   7    4   83   83 +ALI |
   7    4   83   83 =SYNX|*
   7    5   84   84 =META|SS
   7    7   86   86 -ALI |
   7    7   86   86 -NODE|
   7    7   86   86 =WSPC|.
   7    8   87   87 +COMM|
   7    8   87   87 =SYNX|#
   7    9   88   88 =META|.Subsequent.occurrence
   7   31  110  110 -COMM|
   7   31  110  110 =EOL |\x0a
   8    0  111  111 =DENT|..
   8    2  113  113 =SYNX|-
   8    3  114  114 =WSPC|.
   8    4  115  115 +NODE|
   8    4  115  115 +VAL |
   8    4  115  115 =TEXT|Ken.Griffey
   8   15  126  126 -VAL |
   8   15  126  126 -NODE|
   8   15  126  126 =EOL |\x0a
   9    0  127  127 -SEQ |
   9    0  127  127 -NODE|
   9    0  127  127 -PAIR|
   9    0  127  127 -MAP |
   9    0  127  127 -NODE|
   9    0  127  127 -DOC |

perl-pp-perl

 na
{
  'hr' => [
            'Mark McGwire',
            'Sammy Sosa'
          ],
  'rbi' => [
             'Sammy Sosa',
             'Ken Griffey'
           ]
}

perl-pplibyaml-perl

 na
{
  'hr' => [
            'Mark McGwire',
            'Sammy Sosa'
          ],
  'rbi' => [
             'Sammy Sosa',
             'Ken Griffey'
           ]
}

perl-syck-perl

 na
{
  'hr' => [
            'Mark McGwire',
            'Sammy Sosa'
          ],
  'rbi' => [
             'Sammy Sosa',
             'Ken Griffey'
           ]
}

perl-xs-perl

 na
{
  'hr' => [
            'Mark McGwire',
            'Sammy Sosa'
          ],
  'rbi' => [
             ${\$VAR1->{'hr'}[1]},
             'Ken Griffey'
           ]
}

perl-yaml-perl

 na
{
  'hr' => [
            'Mark McGwire',
            'Sammy Sosa'
          ],
  'rbi' => [
             'Sammy Sosa',
             'Ken Griffey'
           ]
}

py-pyyaml-py

 na
{'hr': ['Mark McGwire', 'Sammy Sosa'], 'rbi': ['Sammy Sosa', 'Ken Griffey']}

py-ruamel-py

 na
{'hr': ['Mark McGwire', 'Sammy Sosa'], 'rbi': ['Sammy Sosa', 'Ken Griffey']}

perl-tiny-json

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

perl-tiny-perl

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