I've added a TODO test for this in github. I don't know how to go about fixing it but it looks
ugly.
commit 3d0cc99d6f946d38a05e0db401c2c2151a179465
Author: Todd Rinaldo <toddr@cpan.org>
Date: Thu Jul 15 21:33:20 2010 -0500
Add tests for RT 52432 - '... X' breaks round trip
diff --git a/t/2-scalars.t b/t/2-scalars.t
index 69d797a..53eb89d 100644
--- a/t/2-scalars.t
+++ b/t/2-scalars.t
@@ -1,6 +1,4 @@
-use t::TestYAML tests => 88;
-
-local $SIG{__WARN__} = sub { 1 } if $Test::VERSION < 1.20;
+use t::TestYAML tests => 89;
ok(YAML::Syck->VERSION);
@@ -153,7 +151,7 @@ is(Dump("\xff\xff"), "--- !binary //8=\n");
is(Load("--- !binary //8=\n"), "\xff\xff");
is(Dump("ascii"), "--- ascii\n");
-is(Dump("This is Perl 6 User's Golfing System\n", q[--- "This is Perl6 User's Golfing System\n"]));
+is(Dump("This is Perl 6 User's Golfing System\n"), q[--- "This is Perl 6 User's Golfing System\n"] . "\n" );
$YAML::Syck::SingleQuote = $YAML::Syck::SingleQuote = 1;
@@ -199,3 +197,11 @@ is(Dump('oN'), "--- oN\n"); # invalid case
is(Dump('oFF'), "--- oFF\n"); # invalid case
is(Dump('nULL'), "--- nULL\n"); # invalid case
+# RT 52432 - '... X'
+my $bad_hash = {'... X' => ''};
+my $bad_hash_should = "--- \n... X: ''\n";
+TODO: {
+ local $TODO;
+ $TODO = "roundtrip is breaking for this right now: '$bad_hash_should'";
+ roundtrip($bad_hash);
+}
diff --git a/t/TestYAML.pm b/t/TestYAML.pm
index dfa4d1a..3ed1dc9 100644
--- a/t/TestYAML.pm
+++ b/t/TestYAML.pm
@@ -3,7 +3,7 @@ package t::TestYAML;
BEGIN { $ENV{PERL_DL_NONLAZY} = 0 }
use strict;
-use Test;
+use Test::More;
use YAML::Syck;
sub import {
@@ -12,7 +12,7 @@ sub import {
plan @_;
*::ok = *ok;
- *::is = *ok;
+ *::is = *is;
*::roundtrip = *roundtrip;
*::Dump = *YAML::Syck::Dump;
*::Load = *YAML::Syck::Load;