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

1.1     ! misho       1: --TEST--
        !             2: Test function gzgetc() 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: 
        !            12: // note that gzgets is an alias to fgets. parameter checking tests will be
        !            13: // the same as gzgets
        !            14: 
        !            15: $f = dirname(__FILE__)."/004.txt.gz";
        !            16: $h = gzopen($f, 'r');
        !            17: 
        !            18: $count = 0;
        !            19: while (gzeof($h) === false) {
        !            20:    $count++;
        !            21:    echo fgetc( $h );
        !            22: }
        !            23: 
        !            24: echo "\ncharacters counted=$count\n";
        !            25: gzclose($h);
        !            26: 
        !            27: ?>
        !            28: ===DONE===
        !            29: --EXPECT--
        !            30: When you're taught through feelings
        !            31: Destiny flying high above
        !            32: all I know is that you can realize it
        !            33: Destiny who cares
        !            34: as it turns around
        !            35: and I know that it descends down on me
        !            36: 
        !            37: characters counted=176
        !            38: ===DONE===

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