# YAML Test Matrix

--- &test-M6YH
  Title: Block sequence indentation
  Tags: [ indent ]

YAML

- |
 x
-
 foo: bar
-
 - 42

Expected Events

+STR
+DOC
+SEQ
=VAL |x\n
+MAP
=VAL :foo
=VAL :bar
-MAP
+SEQ
=VAL :42
-SEQ
-SEQ
-DOC
-STR

Expected JSON

[
"x\n",
{
"foo": "bar"
},
[
42
]
]

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
[
  "x\n",
  {
    "foo": "bar"
  },
  [
    "42"
  ]
]

perl-tiny-json

 json_diff
[
  "x\n",
  {
    "foo": "bar"
  },
  [
    "42"
  ]
]

hs-reference-yeast

 na
Line  Col Char Byte Token|Content
   1    0    0    0 +DOC |
   1    0    0    0 +NODE|
   1    0    0    0 +SEQ |
   1    0    0    0 =SYNX|-
   1    1    1    1 +NODE|
   1    1    1    1 =WSPC|.
   1    2    2    2 +VAL |
   1    2    2    2 =SYNX||
   1    3    3    3 =EOL |\x0a
   2    0    4    4 =DENT|.
   2    1    5    5 =TEXT|x
   2    2    6    6 =NEWL|\x0a
   3    0    7    7 -VAL |
   3    0    7    7 -NODE|
   3    0    7    7 =SYNX|-
   3    1    8    8 +NODE|
   3    1    8    8 =EOL |\x0a
   4    0    9    9 +MAP |
   4    0    9    9 =DENT|.
   4    1   10   10 +PAIR|
   4    1   10   10 +NODE|
   4    1   10   10 +VAL |
   4    1   10   10 =TEXT|foo
   4    4   13   13 -VAL |
   4    4   13   13 -NODE|
   4    4   13   13 =SYNX|:
   4    5   14   14 =WSPC|.
   4    6   15   15 +NODE|
   4    6   15   15 +VAL |
   4    6   15   15 =TEXT|bar
   4    9   18   18 -VAL |
   4    9   18   18 -NODE|
   4    9   18   18 =EOL |\x0a
   5    0   19   19 -PAIR|
   5    0   19   19 -MAP |
   5    0   19   19 -NODE|
   5    0   19   19 =SYNX|-
   5    1   20   20 +NODE|
   5    1   20   20 =EOL |\x0a
   6    0   21   21 +SEQ |
   6    0   21   21 =DENT|.
   6    1   22   22 =SYNX|-
   6    2   23   23 =WSPC|.
   6    3   24   24 +NODE|
   6    3   24   24 +VAL |
   6    3   24   24 =TEXT|42
   6    5   26   26 -VAL |
   6    5   26   26 -NODE|
   6    5   26   26 =EOL |\x0a
   7    0   27   27 -SEQ |
   7    0   27   27 -NODE|
   7    0   27   27 -SEQ |
   7    0   27   27 -NODE|
   7    0   27   27 -DOC |

perl-pp-perl

 na
[
  'x
',
  {
    'foo' => 'bar'
  },
  [
    42
  ]
]

perl-pplibyaml-perl

 na
[
  'x
',
  {
    'foo' => 'bar'
  },
  [
    42
  ]
]

perl-syck-perl

 na
[
  'x
',
  {
    'foo' => 'bar'
  },
  [
    42
  ]
]

perl-tiny-perl

 na
[
  'x
',
  {
    'foo' => 'bar'
  },
  [
    '42'
  ]
]

perl-xs-perl

 na
[
  'x
',
  {
    'foo' => 'bar'
  },
  [
    42
  ]
]

perl-yaml-perl

 na
[
  'x
',
  {
    'foo' => 'bar'
  },
  [
    42
  ]
]

py-pyyaml-py

 na
['x\n', {'foo': 'bar'}, [42]]

py-ruamel-py

 na
['x\n', {'foo': 'bar'}, [42]]