Annotation of embedaddon/php/ext/zlib/tests/gztell_basic.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Test function gztell() by calling it with its expected arguments when reading
                      3: --SKIPIF--
                      4: <?php 
                      5: if (!extension_loaded("zlib")) {
                      6:        print "skip - ZLIB extension not loaded"; 
                      7: }
                      8: ?>
                      9: --FILE--
                     10: <?php
                     11: $f = dirname(__FILE__)."/004.txt.gz";
                     12: $h = gzopen($f, 'r');
                     13: $intervals = array(7, 22, 54, 17, 27, 15, 1000);
                     14: // tell should be 7, 29, 83, 100, 127, 142, 176 (176 is length of uncompressed file)
                     15: 
                     16: var_dump(gztell($h));
                     17: foreach ($intervals as $interval) {
                     18:    gzread($h, $interval);
                     19:    var_dump(gztell($h));
                     20: }
                     21: 
                     22: gzclose($h);
                     23: ?>
                     24: ===DONE===
                     25: --EXPECT--
                     26: int(0)
                     27: int(7)
                     28: int(29)
                     29: int(83)
                     30: int(100)
                     31: int(127)
                     32: int(142)
                     33: int(176)
                     34: ===DONE===

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>