X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F030_with_checksum.t;h=e38986a151b4291eeb97322b3393676bc3b91601;hb=3f3dcd72365ac2254a802c0f77bbecc3a02c7b84;hp=18934f894c445b4059d3ff51e96d9d27140c7b16;hpb=81a84db6ebe5ec540d0035fc6d1104cc49c81e25;p=gitmo%2FMooseX-Storage.git diff --git a/t/030_with_checksum.t b/t/030_with_checksum.t index 18934f8..e38986a 100644 --- a/t/030_with_checksum.t +++ b/t/030_with_checksum.t @@ -41,9 +41,9 @@ BEGIN { object => Foo->new( number => 2 ), ); isa_ok( $foo, 'Foo' ); - + my $packed = $foo->pack; - + cmp_deeply( $packed, { @@ -54,11 +54,11 @@ BEGIN { float => 10.5, array => [ 1 .. 10 ], hash => { map { $_ => undef } ( 1 .. 10 ) }, - object => { - __CLASS__ => 'Foo', - __DIGEST__ => re('[0-9a-f]+'), - number => 2 - }, + object => { + __CLASS__ => 'Foo', + __DIGEST__ => re('[0-9a-f]+'), + number => 2 + }, }, '... got the right frozen class' ); @@ -68,7 +68,7 @@ BEGIN { $foo2 = Foo->unpack($packed); }, undef, '... unpacked okay'); isa_ok($foo2, 'Foo'); - + cmp_deeply( $foo2->pack, { @@ -79,14 +79,14 @@ BEGIN { float => 10.5, array => [ 1 .. 10 ], hash => { map { $_ => undef } ( 1 .. 10 ) }, - object => { - __CLASS__ => 'Foo', - __DIGEST__ => re('[0-9a-f]+'), - number => 2 - }, + object => { + __CLASS__ => 'Foo', + __DIGEST__ => re('[0-9a-f]+'), + number => 2 + }, }, '... got the right frozen class' - ); + ); } { @@ -116,7 +116,12 @@ BEGIN { SKIP: { eval { require Digest::HMAC_SHA1 }; - skip join( " ", "no Digest::HMAC", ( $@ =~ /\@INC/ ? () : do { chomp(my $e = $@); "($e)" } ) ), 15 if $@; + if ($@) + { + my $message = join( " ", "no Digest::HMAC", ( $@ =~ /\@INC/ ? () : do { chomp(my $e = $@); "($e)" } ) ); + die $message if $ENV{AUTHOR_TESTING}; + skip $message, 15; + } local $::DEBUG = 1;