php-src/ext/bz2/tests/with_files.phpt
Stanislav Malyshev af5e2eaf8d Merge branch 'pull-request/320'
* 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
2013-06-17 01:06:20 -07:00

24 lines
407 B
PHP

--TEST--
BZ2 with files
--SKIPIF--
<?php if (!extension_loaded("bz2")) print "skip"; ?>
--FILE--
<?php // $Id$
error_reporting(E_ALL);
$filename = "with_files.bz2";
$str = "This is a test string.\n";
$bz = bzopen($filename, "w");
bzwrite($bz, $str);
bzclose($bz);
$bz = bzopen($filename, "r");
print bzread($bz, 10);
print bzread($bz);
bzclose($bz);
unlink($filename);
--EXPECT--
This is a test string.