X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F73oracle_blob.t;h=20a680e98ba5c8f71d812e6f2022290e197a5c04;hb=74b5397c077a964ed301d18f5ccda72afa91f353;hp=e3b89b8ae91801d55abcf696b0bc830ff4e5251e;hpb=3f6a394fe6ffd511796085e22d2651ef04ea70ef;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/t/73oracle_blob.t b/t/73oracle_blob.t index e3b89b8..20a680e 100644 --- a/t/73oracle_blob.t +++ b/t/73oracle_blob.t @@ -59,7 +59,7 @@ SKIP: { my %binstr = ( 'small' => join('', map { chr($_) } ( 1 .. 127 )) ); $binstr{'large'} = $binstr{'small'} x 1024; - my $maxloblen = (length $binstr{'large'}) + 5; + my $maxloblen = (length $binstr{'large'}) + 6; note "Localizing LongReadLen to $maxloblen to avoid truncation of test data"; local $dbh->{'LongReadLen'} = $maxloblen; @@ -86,7 +86,7 @@ SKIP: { my $str = $binstr{$size}; lives_ok { - $rs->create( { 'id' => $id, blob => "blob:$str", clob => "clob:$str" } ) + $rs->create( { 'id' => $id, blob => "blob:$str", clob => "clob:$str", blob2 => "blob2:$str", clob2 => "clob2:$str" } ) } "inserted $size without dying"; my %kids = %{$schema->storage->_dbh->{CachedKids}}; @@ -99,6 +99,8 @@ SKIP: { is @objs, 1, 'One row found matching on both LOBs'; ok (try { $objs[0]->blob }||'' eq "blob:$str", 'blob inserted/retrieved correctly'); ok (try { $objs[0]->clob }||'' eq "clob:$str", 'clob inserted/retrieved correctly'); + ok (try { $objs[0]->clob2 }||'' eq "clob2:$str", "clob2 inserted correctly"); + ok (try { $objs[0]->blob2 }||'' eq "blob2:$str", "blob2 inserted correctly"); { local $TODO = '-like comparison on blobs not tested before ora 10 (fails on 8i)' @@ -123,13 +125,15 @@ SKIP: { lives_ok { $rs->search({ id => $id, blob => "blob:$str", clob => "clob:$str" }) - ->update({ blob => 'updated blob', clob => 'updated clob' }); + ->update({ blob => 'updated blob', clob => 'updated clob', clob2 => 'updated clob2', blob2 => 'updated blob2' }); } 'blob UPDATE with blobs in WHERE clause survived'; @objs = $rs->search({ blob => "updated blob", clob => 'updated clob' })->all; is @objs, 1, 'found updated row'; ok (try { $objs[0]->blob }||'' eq "updated blob", 'blob updated/retrieved correctly'); ok (try { $objs[0]->clob }||'' eq "updated clob", 'clob updated/retrieved correctly'); + ok (try { $objs[0]->clob2 }||'' eq "updated clob2", "clob2 updated correctly"); + ok (try { $objs[0]->blob2 }||'' eq "updated blob2", "blob2 updated correctly"); lives_ok { $rs->search({ id => $id })