mirror of
https://github.com/php/php-src.git
synced 2024-10-01 14:56:10 +00:00
af5e2eaf8d
* pull-request/320: this is test 5 not 6 fix race condition more shared names that create race conditions change to a unique filename more shared filenames yet another shared filename don't share a filename to stop race conditions fix race condition for 2-4 and normalize names for others fix race condition when running tests in parallel clean up after test Fix #64572: Clean up after the test Fix #64572: Clean up after the test
25 lines
461 B
PHP
25 lines
461 B
PHP
--TEST--
|
|
Bug #51997 (SEEK_CUR with 0 value, returns a warning)
|
|
--SKIPIF--
|
|
<?php if (!extension_loaded("bz2")) print "skip"; ?>
|
|
--FILE--
|
|
<?php
|
|
|
|
error_reporting(E_ALL);
|
|
|
|
$filename = "bug51997.bz2";
|
|
$str = "This is a test string.\n";
|
|
$bz = bzopen($filename, "w");
|
|
bzwrite($bz, $str);
|
|
bzclose($bz);
|
|
|
|
$bz = bzopen($filename, "r");
|
|
fseek($bz, 0, SEEK_CUR);
|
|
print bzread($bz, 10);
|
|
print bzread($bz);
|
|
bzclose($bz);
|
|
unlink($filename);
|
|
|
|
--EXPECT--
|
|
This is a test string.
|