diff options
Diffstat (limited to 'ext/bz2/tests/with_files.phpt')
-rw-r--r-- | ext/bz2/tests/with_files.phpt | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/ext/bz2/tests/with_files.phpt b/ext/bz2/tests/with_files.phpt new file mode 100644 index 0000000000..cb98912d01 --- /dev/null +++ b/ext/bz2/tests/with_files.phpt @@ -0,0 +1,25 @@ +--TEST-- +BZ2 with files +--SKIPIF-- +<?php if (!extension_loaded("bz2")) print "skip"; ?> +--POST-- +--GET-- +--FILE-- +<?php // $Id$ + +error_reporting(E_ALL); + +$filename = "testfile.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. |