# YAML Test Matrix

--- &test-6SLA
  Title: Allowed characters in quoted mapping key
  Tags: [ double, mapping, single ]

YAML

"foo\nbar:baz\tx \\$%^&*()x": 23
'x\ny:z\tx $%^&*()x': 24

Expected Events

+STR
+DOC
+MAP
=VAL "foo\nbar:baz\tx \\$%^&*()x
=VAL :23
=VAL 'x\\ny:z\\tx $%^&*()x
=VAL :24
-MAP
-DOC
-STR

Expected JSON

{
"foo\nbar:baz\tx \\$%^&*()x": 23,
"x\\ny:z\\tx $%^&*()x": 24
}

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

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

dotnet-yamldotnet-json

 json_diff
parse error: Invalid numeric literal at line 1, column 3

perl-tiny-json

 json_diff
{
  "foo\nbar:baz\tx \\$%^&*()x": "23",
  "x\\ny:z\\tx $%^&*()x": "24"
}

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 =SYNX|"
   1    1    1    1 =TEXT|foo
   1    4    4    4 +ESC |
   1    4    4    4 =SYNX|\x5c
   1    5    5    5 =META|n
   1    6    6    6 -ESC |
   1    6    6    6 =TEXT|bar:baz
   1   13   13   13 +ESC |
   1   13   13   13 =SYNX|\x5c
   1   14   14   14 =META|t
   1   15   15   15 -ESC |
   1   15   15   15 =TEXT|x.
   1   17   17   17 +ESC |
   1   17   17   17 =SYNX|\x5c
   1   18   18   18 =META|\x5c
   1   19   19   19 -ESC |
   1   19   19   19 =TEXT|$%^&*()x
   1   27   27   27 =SYNX|"
   1   28   28   28 -VAL |
   1   28   28   28 -NODE|
   1   28   28   28 =SYNX|:
   1   29   29   29 =WSPC|.
   1   30   30   30 +NODE|
   1   30   30   30 +VAL |
   1   30   30   30 =TEXT|23
   1   32   32   32 -VAL |
   1   32   32   32 -NODE|
   1   32   32   32 =EOL |\x0a
   2    0   33   33 -PAIR|
   2    0   33   33 +PAIR|
   2    0   33   33 +NODE|
   2    0   33   33 +VAL |
   2    0   33   33 =SYNX|'
   2    1   34   34 =TEXT|x\x5cny:z\x5ctx.$%^&*()x
   2   19   52   52 =SYNX|'
   2   20   53   53 -VAL |
   2   20   53   53 -NODE|
   2   20   53   53 =SYNX|:
   2   21   54   54 =WSPC|.
   2   22   55   55 +NODE|
   2   22   55   55 +VAL |
   2   22   55   55 =TEXT|24
   2   24   57   57 -VAL |
   2   24   57   57 -NODE|
   2   24   57   57 =EOL |\x0a
   3    0   58   58 -PAIR|
   3    0   58   58 -MAP |
   3    0   58   58 -NODE|
   3    0   58   58 -DOC |

perl-pp-perl

 na
{
  'foo
bar:baz	x \\$%^&*()x' => 23,
  'x\\ny:z\\tx $%^&*()x' => 24
}

perl-pplibyaml-perl

 na
{
  'foo
bar:baz	x \\$%^&*()x' => 23,
  'x\\ny:z\\tx $%^&*()x' => 24
}

perl-syck-perl

 na
{
  'foo
bar:baz	x \\$%^&*()x' => 23,
  'x\\ny:z\\tx $%^&*()x' => 24
}

perl-tiny-perl

 na
{
  'foo
bar:baz	x \\$%^&*()x' => '23',
  'x\\ny:z\\tx $%^&*()x' => '24'
}

perl-xs-perl

 na
{
  'foo
bar:baz	x \\$%^&*()x' => 23,
  'x\\ny:z\\tx $%^&*()x' => 24
}

perl-yaml-perl

 na
{
  'foo
bar:baz	x \\$%^&*()x' => 23,
  'x\\ny:z\\tx $%^&*()x' => 24
}

py-pyyaml-py

 na
{'foo\nbar:baz\tx \\$%^&*()x': 23, 'x\\ny:z\\tx $%^&*()x': 24}

py-ruamel-py

 na
{'foo\nbar:baz\tx \\$%^&*()x': 23, 'x\\ny:z\\tx $%^&*()x': 24}