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

1.1     ! misho       1: --TEST--
        !             2: Test function gzopen() by calling it twice on the same file and not closing one of them at the end of the script
        !             3: --SKIPIF--
        !             4: <?php 
        !             5: if (!extension_loaded("zlib")) {
        !             6:        print "skip - ZLIB extension not loaded"; 
        !             7: }
        !             8: ?>
        !             9: --FILE--
        !            10: <?php
        !            11: 
        !            12: $f = dirname(__FILE__)."/004.txt.gz";
        !            13: $h1 = gzopen($f, 'r');
        !            14: $h2 = gzopen($f, 'r');
        !            15: 
        !            16: var_dump(gzread($h1, 30));
        !            17: var_dump(gzread($h2, 10));
        !            18: var_dump(gzread($h1, 15));
        !            19: gzclose($h1);
        !            20: var_dump(gzread($h2, 50));
        !            21: // deliberately do not close $h2
        !            22: ?>
        !            23: ===DONE===
        !            24: --EXPECT--
        !            25: string(30) "When you're taught through fee"
        !            26: string(10) "When you'r"
        !            27: string(15) "lings
        !            28: Destiny f"
        !            29: string(50) "e taught through feelings
        !            30: Destiny flying high abov"
        !            31: ===DONE===

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