Annotation of embedaddon/php/ext/zlib/tests/gzeof_variation1.phpt, revision 1.1.1.2
1.1 misho 1: --TEST--
2: Test function gzeof while writing.
3: --SKIPIF--
4: <?php
5: if (!extension_loaded("zlib")) {
6: print "skip - ZLIB extension not loaded";
7: }
8: ?>
9: --FILE--
10: <?php
11:
1.1.1.2 ! misho 12: $filename = dirname(__FILE__)."/gzeof_variation1.txt.gz";
1.1 misho 13: $h = gzopen($filename, 'w');
14: $str = "Here is the string to be written. ";
15: $length = 10;
16: gzwrite( $h, $str );
17: var_dump(gzeof($h));
18: gzwrite( $h, $str, $length);
19: var_dump(gzeof($h));
20: gzclose($h);
21: var_dump(gzeof($h));
22: unlink($filename);
23: ?>
24: ===DONE===
25: --EXPECTF--
26: bool(false)
27: bool(false)
28:
29: Warning: gzeof(): %d is not a valid stream resource in %s on line %d
30: bool(false)
31: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>