Annotation of embedaddon/php/ext/zlib/tests/gzrewind_variation1.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Test function gzrewind() by calling it with its expected arguments when writing
3: --SKIPIF--
4: <?php
5: if (!extension_loaded("zlib")) {
6: print "skip - ZLIB extension not loaded";
7: }
8: ?>
9: --FILE--
10: <?php
11: $f = "temp2.txt.gz";
12: $h = gzopen($f, 'w');
13: gzwrite($h, b'The first string.');
14: var_dump(gzrewind($h));
15: gzwrite($h, b'The second string.');
16: gzclose($h);
17:
18: $h = gzopen($f, 'r');
19: gzpassthru($h);
20: gzclose($h);
21: unlink($f);
22: echo "\n";
23: ?>
24: ===DONE===
25: --EXPECT--
26: bool(false)
27: The first string.The second string.
28: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>