From: Ard Biesheuvel Date: Sat, 16 Aug 2003 20:10:51 +0000 (+0000) Subject: MFH X-Git-Tag: php-4.3.3RC4~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2732fbadbecab509e87db155b0dfb6aa59662cf5;p=php MFH --- diff --git a/ext/interbase/tests/004.phpt b/ext/interbase/tests/004.phpt index 1ed6415324..ef4b2d8a6c 100644 --- a/ext/interbase/tests/004.phpt +++ b/ext/interbase/tests/004.phpt @@ -17,8 +17,8 @@ InterBase: BLOB test v_blob blob)"); ibase_commit(); - /* create 10k blob file */ - $blob_str = rand_binstr(10*1024); + /* create 100k blob file */ + $blob_str = rand_binstr(100*1024); $name = tempnam(dirname(__FILE__),"blob.tmp"); $ftmp = fopen($name,"w"); @@ -36,10 +36,19 @@ InterBase: BLOB test $bl_h = ibase_blob_open($row->V_BLOB); $blob = ''; - while($piece = ibase_blob_get($bl_h, rand() % 1024)) + while($piece = ibase_blob_get($bl_h, 1 + rand() % 1024)) $blob .= $piece; if($blob != $blob_str) - echo " BLOB 1 fail\n"; + echo " BLOB 1 fail (1)\n"; + ibase_blob_close($bl_h); + + $bl_h = ibase_blob_open($row->V_BLOB); + + $blob = ''; + while($piece = ibase_blob_get($bl_h, 100 * 1024)) + $blob .= $piece; + if($blob != $blob_str) + echo " BLOB 1 fail (2)\n"; ibase_blob_close($bl_h); ibase_free_result($q); unset($blob); @@ -48,7 +57,7 @@ InterBase: BLOB test $bl_h = ibase_blob_create(); $ftmp = fopen($name,"r"); - while($piece = fread($ftmp, rand() % 1024)){ + while($piece = fread($ftmp, 1 + rand() % 1024)){ ibase_blob_add($bl_h, $piece); } fclose($ftmp); @@ -61,7 +70,7 @@ InterBase: BLOB test $row = ibase_fetch_object($q); $bl_h = ibase_blob_open($row->V_BLOB); $blob = ''; - while($piece = ibase_blob_get($bl_h, rand() % 1024)) + while($piece = ibase_blob_get($bl_h, 1 + rand() % 1024)) $blob .= $piece; if($blob != $blob_str) echo " BLOB 2 fail\n";