# YAML Test Matrix

--- &test-H2RW
  Title: Blank lines
  Tags: [ comment, literal, scalar, whitespace ]

YAML

foo: 1

bar: 2
    
text: |
  a
    
  b

  c
 
  d

Expected Events

+STR
+DOC
+MAP
=VAL :foo
=VAL :1
=VAL :bar
=VAL :2
=VAL :text
=VAL |a\n  \nb\n\nc\n\nd\n
-MAP
-DOC
-STR

Expected JSON

{
"bar": 2,
"foo": 1,
"text": "a\n \nb\n\nc\n\nd\n"
}

c-libfyaml-event

 ok

c-libyaml-event

 ok

cpp-yamlcpp-event

 ok

dotnet-yamldotnet-event

 ok

hs-hsyaml-event

 ok

java-snakeyaml-event

 ok

js-yaml-event

 ok

nim-nimyaml-event

 ok

perl-pp-event

 ok

perl-pplibyaml-event

 ok

py-pyyaml-event

 ok

py-ruamel-event

 ok

c-libfyaml-json

 json_ok

hs-hsyaml-json

 json_ok

java-snakeyaml-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-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
{
  "bar": "2",
  "foo": "1",
  "text": "a\n  \nb\n\nc\n\nd\n"
}

perl-syck-json

 json_diff
{
  "bar": 2,
  "foo": 1,
  "text": "a\n\nb\n\nc\n\nd\n"
}

perl-tiny-json

 json_diff
{
  "bar": "2",
  "foo": "1",
  "text": "a\nb\nc\nd\n"
}

perl-pp-perl

 na
{
  'bar' => 2,
  'foo' => 1,
  'text' => 'a
  
b

c

d
'
}

perl-pplibyaml-perl

 na
{
  'bar' => 2,
  'foo' => 1,
  'text' => 'a
  
b

c

d
'
}

perl-syck-perl

 na
{
  'bar' => 2,
  'foo' => 1,
  'text' => 'a

b

c

d
'
}

perl-tiny-perl

 na
{
  'bar' => '2',
  'foo' => '1',
  'text' => 'a
b
c
d
'
}

perl-xs-perl

 na
{
  'bar' => 2,
  'foo' => 1,
  'text' => 'a
  
b

c

d
'
}

perl-yaml-perl

 na
{
  'bar' => 2,
  'foo' => 1,
  'text' => 'a
  
b

c

d
'
}

py-pyyaml-py

 na
{'bar': 2, 'foo': 1, 'text': 'a\n  \nb\n\nc\n\nd\n'}

py-ruamel-py

 na
{'bar': 2, 'foo': 1, 'text': 'a\n  \nb\n\nc\n\nd\n'}