From: Rafael Kitover Date: Thu, 22 Jul 2010 09:43:43 +0000 (-0400) Subject: fix sybase fail, add more diagnostics for firebird blob fail X-Git-Tag: v0.08124~109 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cdf7f026f607854a455e15b682c4b72160c63065;p=dbsrgits%2FDBIx-Class.git fix sybase fail, add more diagnostics for firebird blob fail --- diff --git a/t/746sybase.t b/t/746sybase.t index daca426..2210db7 100644 --- a/t/746sybase.t +++ b/t/746sybase.t @@ -556,14 +556,15 @@ SQL $row = $rs->create({ amount => 100 }); } 'inserted a money value'; - is eval { $rs->find($row->id)->amount }, 100, 'money value round-trip'; + cmp_ok eval { $rs->find($row->id)->amount }, '==', 100, + 'money value round-trip'; lives_ok { $row->update({ amount => 200 }); } 'updated a money value'; - is eval { $rs->find($row->id)->amount }, - 200, 'updated money value round-trip'; + cmp_ok eval { $rs->find($row->id)->amount }, '==', 200, + 'updated money value round-trip'; lives_ok { $row->update({ amount => undef }); diff --git a/t/750firebird.t b/t/750firebird.t index bdb3eea..49443b2 100644 --- a/t/750firebird.t +++ b/t/750firebird.t @@ -241,7 +241,18 @@ EOF lives_ok { $rs->create( { 'id' => $id, $type => $binstr{$size} } ) } "inserted $size $type without dying"; - ok($rs->find($id)->$type eq $binstr{$size}, "verified inserted $size $type" ); + my $got = $rs->find($id)->$type; + + my $hexdump = sub { join '', map sprintf('%02X', ord), split //, shift }; + + ok($got eq $binstr{$size}, "verified inserted $size $type" ) + or do { + diag "For " . (ref $schema->storage) . "\n"; + diag "Got blob:\n"; + diag $hexdump->(substr($got,0,50)); + diag "Expecting blob:\n"; + diag $hexdump->(substr($binstr{$size},0,50)); + }; } } }