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