Annotation of embedaddon/php/ext/zlib/tests/gzread_basic.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Test function gzread() 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: // note that gzread is an alias to fread. parameter checking tests will be
12: // the same as fread
13:
14: $f = dirname(__FILE__)."/004.txt.gz";
15: $h = gzopen($f, 'r');
16: $lengths = array(10, 14, 7, 99, 2000);
17:
18: foreach ($lengths as $length) {
19: var_dump(gzread( $h, $length ) );
20: }
21: gzclose($h);
22:
23: ?>
24: ===DONE===
25: --EXPECT--
26: string(10) "When you'r"
27: string(14) "e taught throu"
28: string(7) "gh feel"
29: string(99) "ings
30: Destiny flying high above
31: all I know is that you can realize it
32: Destiny who cares
33: as it turns "
34: string(46) "around
35: and I know that it descends down on me
36: "
37: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>