xref: /PHP-5.3/ext/bz2/tests/with_files.phpt (revision 29cfd6d2)
1--TEST--
2BZ2 with files
3--SKIPIF--
4<?php if (!extension_loaded("bz2")) print "skip"; ?>
5--FILE--
6<?php // $Id$
7
8error_reporting(E_ALL);
9
10$filename = "testfile.bz2";
11$str = "This is a test string.\n";
12$bz = bzopen($filename, "w");
13bzwrite($bz, $str);
14bzclose($bz);
15
16$bz = bzopen($filename, "r");
17print bzread($bz, 10);
18print bzread($bz);
19bzclose($bz);
20unlink($filename);
21
22--EXPECT--
23This is a test string.
24