# YAML Test Matrix

--- &test-S98Z
  Title: Block scalar with spaces only
  Tags: [ comment, folded, scalar, whitespace ]

YAML

empty block scalar: >
 
  
   
 # comment

Expected Events

+STR
+DOC
+MAP
=VAL :empty block scalar
=VAL >
-MAP
-DOC
-STR

Expected JSON

{
"empty block scalar": ""
}

cpp-event

 ok

java-event

 ok

libyaml-event

 ok

perl5-pp-event

 ok

pyyaml-event

 ok

ruamel-event

 ok

java-json

 json_ok

js-yaml-json

 json_ok

luajit-json

 json_ok

perl5-pp-json

 json_ok

perl5-xs-json

 json_ok

pyyaml-json

 json_ok

ruamel-json

 json_ok

ruby-json

 json_ok

nimyaml-event

 diff
Got Events:
+STR
+DOC
+MAP
=VAL :empty block scalar
=VAL >\n\n\n# comment\n
-MAP
-DOC
-STR

perl5-pegex-event

 diff
Got Events:
+STR
+DOC
+MAP
=VAL :empty block scalar
=VAL >\n\n\n# comment\n
-MAP
-DOC
-STR

perl5-pm-json

 json_diff
{
  "empty block scalar": "\n \n  \n# comment\n"
}

perl5-syck-json

 json_diff
{
  "empty block scalar": "\n\n\n# comment\n"
}

hs-yaml-event

 error
+STR
+DOC
+MAP
=VAL :empty block scalar
parsing error near byte offset Pos {posByteOffset = 42, posCharOffset = 42, posLine = 6, posColumn = 0} (leading empty lines contain more spaces than the first non-empty line in scalar)

hs-yaml-json

 error
hsyaml-parser: user error (:6:0: leading empty lines contain more spaces than the first non-empty line in scalar)

perl5-tiny-json

 error
YAML::Tiny failed to find multi-line scalar content at /bin/perl5-tiny-json line 12.

perl5-tiny-pl

 error
YAML::Tiny failed to find multi-line scalar content at /bin/perl5-tiny-pl line 15.

perl5-pm-pl

 na
{
  'empty block scalar' => '
 
  
# comment
'
}

perl5-pp-pl

 na
{
  'empty block scalar' => ''
}

perl5-syck-pl

 na
{
  'empty block scalar' => '


# comment
'
}

perl5-xs-pl

 na
{
  'empty block scalar' => ''
}

pyyaml-py

 na
{'empty block scalar': ''}

ruamel-py

 na
{'empty block scalar': ''}