Annotation of embedaddon/php/ext/zlib/tests/gzgetc_basic.phpt, revision 1.1.1.2

1.1       misho       1: --TEST--
1.1.1.2 ! misho       2: Test function gzgetc() by calling it with its expected arguments zlib 1.2.5
1.1       misho       3: --SKIPIF--
                      4: <?php 
                      5: if (!extension_loaded("zlib")) {
                      6:        print "skip - ZLIB extension not loaded"; 
                      7: }
1.1.1.2 ! misho       8: include 'func.inc';
        !             9: if (version_compare(get_zlib_version(), '1.2.5') > 0) {
        !            10:        die('skip - only for zlib <= 1.2.5');
        !            11: }
1.1       misho      12: ?>
                     13: --FILE--
                     14: <?php
                     15: 
                     16: // note that gzgets is an alias to fgets. parameter checking tests will be
                     17: // the same as gzgets
                     18: 
                     19: $f = dirname(__FILE__)."/004.txt.gz";
                     20: $h = gzopen($f, 'r');
                     21: 
                     22: $count = 0;
                     23: while (gzeof($h) === false) {
                     24:    $count++;
                     25:    echo fgetc( $h );
                     26: }
                     27: 
                     28: echo "\ncharacters counted=$count\n";
                     29: gzclose($h);
                     30: 
                     31: ?>
                     32: ===DONE===
                     33: --EXPECT--
                     34: When you're taught through feelings
                     35: Destiny flying high above
                     36: all I know is that you can realize it
                     37: Destiny who cares
                     38: as it turns around
                     39: and I know that it descends down on me
                     40: 
                     41: characters counted=176
1.1.1.2 ! misho      42: ===DONE===

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