# YAML Test Matrix

--- &test-Y2GN
  Title: Anchor with colon in the middle
  Tags: [ anchor ]

YAML

---
key: &an:chor value

Expected Events

+STR
+DOC ---
+MAP
=VAL :key
=VAL &an:chor :value
-MAP
-DOC
-STR

Expected JSON

{
"key": "value"
}

c-libfyaml-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-ruamel-event

 ok

c-libfyaml-json

 json_ok

dotnet-yamldotnet-json

 json_ok

hs-hsyaml-json

 json_ok

js-jsyaml-json

 json_ok

js-yaml-json

 json_ok

perl-pp-json

 json_ok

py-ruamel-json

 json_ok

c-libyaml-event

 diff
Got Events:
+STR
+DOC ---
+MAP
=VAL :key
=VAL &an ::chor value
-MAP
-DOC
-STR

py-pyyaml-event

 diff
Got Events:
+STR
+DOC ---
+MAP
=VAL :key
=VAL &an ::chor value
-MAP
-DOC
-STR

rust-yamlrust-event

 diff
Minimal Events:
+STR
+DOC
+MAP
=VAL :key
=VAL &1 :value
-MAP
-DOC
-STR
Transformed Events:
+STR
+DOC
+MAP
=VAL :key
=VAL &1 ::chor value
-MAP
-DOC
-STR
Got Events:
+STR
+DOC
+MAP
=VAL :key
=VAL &1 ::chor value
-MAP
-DOC
-STR

go-yaml-json

 json_diff
{
  "key": ":chor value"
}

lua-lyaml-json

 json_diff
{
  "key": ":chor value"
}

perl-pplibyaml-json

 json_diff
{
  "key": ":chor value"
}

perl-syck-json

 json_diff
{
  "key": ":chor value"
}

perl-xs-json

 json_diff
{
  "key": ":chor value"
}

perl-yaml-json

 json_diff
{
  "key": ":chor value"
}

py-pyyaml-json

 json_diff
{
  "key": ":chor value"
}

ruby-psych-json

 json_diff
{
  "key": "chor value"
}

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|key
   2    3    7    7 -VAL |
   2    3    7    7 -NODE|
   2    3    7    7 =SYNX|:
   2    4    8    8 =WSPC|.
   2    5    9    9 +NODE|
   2    5    9    9 +PROP|
   2    5    9    9 +ANCH|
   2    5    9    9 =SYNX|&
   2    6   10   10 =META|an:chor
   2   13   17   17 -ANCH|
   2   13   17   17 -PROP|
   2   13   17   17 =WSPC|.
   2   14   18   18 +VAL |
   2   14   18   18 =TEXT|value
   2   19   23   23 -VAL |
   2   19   23   23 -NODE|
   2   19   23   23 =EOL |\x0a
   3    0   24   24 -PAIR|
   3    0   24   24 -MAP |
   3    0   24   24 -NODE|
   3    0   24   24 -DOC |

perl-pp-perl

 na
{
  'key' => 'value'
}

perl-pplibyaml-perl

 na
{
  'key' => ':chor value'
}

perl-syck-perl

 na
{
  'key' => ':chor value'
}

perl-xs-perl

 na
{
  'key' => ':chor value'
}

perl-yaml-perl

 na
{
  'key' => ':chor value'
}

py-pyyaml-py

 na
{'key': ':chor value'}

py-ruamel-py

 na
{'key': 'value'}

perl-tiny-json

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

perl-tiny-perl

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