Annotation of embedaddon/php/ext/zlib/tests/gzwrite_error2.phpt, revision 1.1.1.2
1.1 misho 1: --TEST--
2: Test function gzwrite() by calling it invalid lengths
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 = "gzwrite_error2.txt.gz";
1.1 misho 13: $h = gzopen($filename, 'w');
14: $str = "Here is the string to be written. ";
15: var_dump(gzwrite( $h, $str, 0 ) );
16: var_dump(gzwrite( $h, $str, -1 ) );
17: gzclose($h);
18:
19: $h = gzopen($filename, 'r');
20: gzpassthru($h);
21: gzclose($h);
22: echo "\n";
23: unlink($filename);
24: ?>
25: ===DONE===
26: --EXPECT--
27: int(0)
28: int(0)
29:
30: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>