# YAML Test Matrix

--- &test-FBC9
  Title: Allowed characters in plain scalars
  Tags: [ scalar ]

YAML

safe: a!"#$%&'()*+,-./09:;<=>?@AZ[\]^_`az{|}~
     !"#$%&'()*+,-./09:;<=>?@AZ[\]^_`az{|}~
safe question mark: ?foo
safe colon: :foo
safe dash: -foo

Expected Events

+STR
+DOC
+MAP
=VAL :safe
=VAL :a!"#$%&'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~ !"#$%&'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~
=VAL :safe question mark
=VAL :?foo
=VAL :safe colon
=VAL ::foo
=VAL :safe dash
=VAL :-foo
-MAP
-DOC
-STR

Expected JSON

{
"safe": "a!\"#$%&'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~ !\"#$%&'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~",
"safe colon": ":foo",
"safe dash": "-foo",
"safe question mark": "?foo"
}

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

py-pyyaml-json

 json_ok

py-ruamel-json

 json_ok

ruby-psych-json

 json_diff
{
  "safe": "a!\"#$%&'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~ !\"#$%&'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~",
  "safe colon": "foo",
  "safe dash": "-foo",
  "safe question mark": "?foo"
}

perl-tiny-json

 error
YAML::Tiny found bad indenting in line '     !"#$%&'()*+,-./09:;<=>?@AZ[\]^_`az{|}~' at /yaml/bin/perl-tiny-json line 12.

perl-tiny-perl

 error
YAML::Tiny found bad indenting in line '     !"#$%&'()*+,-./09:;<=>?@AZ[\]^_`az{|}~' at /yaml/bin/perl-tiny-perl line 15.

perl-yaml-json

 error
YAML Error: Inconsistent indentation level
   Code: YAML_PARSE_ERR_INCONSISTENT_INDENTATION
   Line: 2
   Document: 1
 at /perl5/lib/perl5/YAML/Loader.pm line 804.

perl-yaml-perl

 error
YAML Error: Inconsistent indentation level
   Code: YAML_PARSE_ERR_INCONSISTENT_INDENTATION
   Line: 2
   Document: 1
 at /perl5/lib/perl5/YAML/Loader.pm line 804.

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|safe
   1    4    4    4 -VAL |
   1    4    4    4 -NODE|
   1    4    4    4 =SYNX|:
   1    5    5    5 =WSPC|.
   1    6    6    6 +NODE|
   1    6    6    6 +VAL |
   1    6    6    6 =TEXT|a!"#$%&'()*+,-./09:;<=>?@AZ[\x5c]^_`az{|}~
   1   45   45   45 =FOLD|\x0a
   2    0   46   46 =DENT|.
   2    1   47   47 =WSPC|....
   2    5   51   51 =TEXT|!"#$%&'()*+,-./09:;<=>?@AZ[\x5c]^_`az{|}~
   2   43   89   89 -VAL |
   2   43   89   89 -NODE|
   2   43   89   89 =EOL |\x0a
   3    0   90   90 -PAIR|
   3    0   90   90 +PAIR|
   3    0   90   90 +NODE|
   3    0   90   90 +VAL |
   3    0   90   90 =TEXT|safe.question.mark
   3   18  108  108 -VAL |
   3   18  108  108 -NODE|
   3   18  108  108 =SYNX|:
   3   19  109  109 =WSPC|.
   3   20  110  110 +NODE|
   3   20  110  110 +VAL |
   3   20  110  110 =TEXT|?foo
   3   24  114  114 -VAL |
   3   24  114  114 -NODE|
   3   24  114  114 =EOL |\x0a
   4    0  115  115 -PAIR|
   4    0  115  115 +PAIR|
   4    0  115  115 +NODE|
   4    0  115  115 +VAL |
   4    0  115  115 =TEXT|safe.colon
   4   10  125  125 -VAL |
   4   10  125  125 -NODE|
   4   10  125  125 =SYNX|:
   4   11  126  126 =WSPC|.
   4   12  127  127 +NODE|
   4   12  127  127 +VAL |
   4   12  127  127 =TEXT|:foo
   4   16  131  131 -VAL |
   4   16  131  131 -NODE|
   4   16  131  131 =EOL |\x0a
   5    0  132  132 -PAIR|
   5    0  132  132 +PAIR|
   5    0  132  132 +NODE|
   5    0  132  132 +VAL |
   5    0  132  132 =TEXT|safe.dash
   5    9  141  141 -VAL |
   5    9  141  141 -NODE|
   5    9  141  141 =SYNX|:
   5   10  142  142 =WSPC|.
   5   11  143  143 +NODE|
   5   11  143  143 +VAL |
   5   11  143  143 =TEXT|-foo
   5   15  147  147 -VAL |
   5   15  147  147 -NODE|
   5   15  147  147 =EOL |\x0a
   6    0  148  148 -PAIR|
   6    0  148  148 -MAP |
   6    0  148  148 -NODE|
   6    0  148  148 -DOC |

perl-pp-perl

 na
{
  'safe' => 'a!"#$%&\'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~ !"#$%&\'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~',
  'safe colon' => ':foo',
  'safe dash' => '-foo',
  'safe question mark' => '?foo'
}

perl-pplibyaml-perl

 na
{
  'safe' => 'a!"#$%&\'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~ !"#$%&\'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~',
  'safe colon' => ':foo',
  'safe dash' => '-foo',
  'safe question mark' => '?foo'
}

perl-syck-perl

 na
{
  'safe' => 'a!"#$%&\'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~ !"#$%&\'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~',
  'safe colon' => ':foo',
  'safe dash' => '-foo',
  'safe question mark' => '?foo'
}

perl-xs-perl

 na
{
  'safe' => 'a!"#$%&\'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~ !"#$%&\'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~',
  'safe colon' => ':foo',
  'safe dash' => '-foo',
  'safe question mark' => '?foo'
}

py-pyyaml-py

 na
{'safe': 'a!"#$%&\'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~ '
         '!"#$%&\'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~',
 'safe colon': ':foo',
 'safe dash': '-foo',
 'safe question mark': '?foo'}

py-ruamel-py

 na
{'safe': 'a!"#$%&\'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~ '
         '!"#$%&\'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~',
 'safe colon': ':foo',
 'safe dash': '-foo',
 'safe question mark': '?foo'}