Annotation of embedaddon/php/ext/bz2/tests/bug51997.phpt, revision 1.1.1.2
1.1 misho 1: --TEST--
2: Bug #51997 (SEEK_CUR with 0 value, returns a warning)
3: --SKIPIF--
4: <?php if (!extension_loaded("bz2")) print "skip"; ?>
5: --FILE--
6: <?php
7:
8: error_reporting(E_ALL);
9:
1.1.1.2 ! misho 10: $filename = "bug51997.bz2";
1.1 misho 11: $str = "This is a test string.\n";
12: $bz = bzopen($filename, "w");
13: bzwrite($bz, $str);
14: bzclose($bz);
15:
16: $bz = bzopen($filename, "r");
17: fseek($bz, 0, SEEK_CUR);
18: print bzread($bz, 10);
19: print bzread($bz);
20: bzclose($bz);
21: unlink($filename);
22:
23: --EXPECT--
24: This is a test string.
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>