Skip Menu |

This queue is for tickets about the Template-Plugin-YAML CPAN distribution.

Report information
The Basics
Id: 21630
Status: resolved
Priority: 0/
Queue: Template-Plugin-YAML

People
Owner: Nobody in particular
Requestors: gsimmons [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.22
Fixed in: (no value)



Subject: 00simple.t failure - no version number in YAML header
Hi, YAML.pm no longer includes the YAML version number (eg. 1.0) in the separator/header by default ('UseVersion'): http://search.cpan.org/~ingy/YAML-0.62/lib/YAML.pm#GLOBAL_OPTIONS 00simple.t expects the version number to be present in the template output (after the dump of a data structure) and consequently fails this test: t/00simple....NOK 3 # Failed test 'got what we expected' # in t/00simple.t at line 14. # got: '--- # - foo: bar # - foo: baz # ' # expected: '--- #YAML:1.0 # - foo: bar # - foo: baz # ' # Looks like you failed 1 test of 3. Attached is a patch which removes the version number check from this test file. Tested with YAML 0.62.
Subject: version_remove.patch
diff -ur Template-Plugin-YAML-1.22/t/00simple.t Template-Plugin-YAML/t/00simple.t --- Template-Plugin-YAML-1.22/t/00simple.t 2003-07-31 08:38:44.000000000 +1000 +++ Template-Plugin-YAML/t/00simple.t 2006-09-23 13:16:52.000000000 +1000 @@ -11,4 +11,4 @@ is( $tt->error, undef ); -is( $out, "--- #YAML:1.0\n- foo: bar\n- foo: baz\n", "got what we expected" ); +is( $out, "---\n- foo: bar\n- foo: baz\n", "got what we expected" );
Fixed in 1.23 by roundtripping the data dumped rather than relying on golden output. -- Richard Clamp <richardc@unixbeard.net>