tony2001 Thu Feb 2 15:04:22 2006 UTC Modified files: /php-src/ext/zlib/tests gzreadgzwrite.phpt gzreadgzwriteplain.phpt Log: fix tests http://cvs.php.net/viewcvs.cgi/php-src/ext/zlib/tests/gzreadgzwrite.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/zlib/tests/gzreadgzwrite.phpt diff -u php-src/ext/zlib/tests/gzreadgzwrite.phpt:1.3 php-src/ext/zlib/tests/gzreadgzwrite.phpt:1.4 --- php-src/ext/zlib/tests/gzreadgzwrite.phpt:1.3 Wed May 19 08:45:23 2004 +++ php-src/ext/zlib/tests/gzreadgzwrite.phpt Thu Feb 2 15:04:22 2006 @@ -15,7 +15,12 @@ fclose($fp); $fp = gzopen($filename, "rb"); -$data = gzread($fp, strlen($original)); + +$data = ''; +while ($buf = gzread($fp, 8092)) { + $data .= $buf; +} + if ($data == $original) { echo "Strings are equal\n"; } else { http://cvs.php.net/viewcvs.cgi/php-src/ext/zlib/tests/gzreadgzwriteplain.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/zlib/tests/gzreadgzwriteplain.phpt diff -u php-src/ext/zlib/tests/gzreadgzwriteplain.phpt:1.3 php-src/ext/zlib/tests/gzreadgzwriteplain.phpt:1.4 --- php-src/ext/zlib/tests/gzreadgzwriteplain.phpt:1.3 Wed May 19 08:45:23 2004 +++ php-src/ext/zlib/tests/gzreadgzwriteplain.phpt Thu Feb 2 15:04:22 2006 @@ -15,7 +15,12 @@ fclose($fp); $fp = gzopen($filename, "rb"); -$data = gzread($fp, strlen($original)); + +$data = ''; +while ($buf = gzread($fp, 8192)) { + $data .= $buf; +} + if ($data == $original) { echo "Strings are equal\n"; } else { @@ -24,7 +29,11 @@ } gzseek($fp, strlen($original) / 2); -$data = gzread($fp, strlen($original)); + +$data = ''; +while ($buf = gzread($fp, 8192)) { + $data .= $buf; +} var_dump(strlen($data)); if ($data == substr($original, strlen($original) / 2)) {
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php