php-src/ext/bz2/tests/with_files.phpt
Sara Golemon 37b1114556 Make some tests pass.
compression is just a binary thing.
Write unicode and suffer my wrath!
2006-04-02 17:41:04 +00:00

24 lines
406 B
PHP

--TEST--
BZ2 with files
--SKIPIF--
<?php if (!extension_loaded("bz2")) print "skip"; ?>
--FILE--
<?php // $Id$
error_reporting(E_ALL);
$filename = "testfile.bz2";
$str = b"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.