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

1.1     ! misho       1: --TEST--
        !             2: zlib.inflate of gzip-encoded stream
        !             3: --SKIPIF--
        !             4: <?php if (!extension_loaded("zlib")) print "skip"; ?>
        !             5: --FILE--
        !             6: <?php /* $Id: zlib_filter_inflate2.phpt 296107 2010-03-12 10:28:59Z jani $ */
        !             7: 
        !             8: $a = gzopen(dirname(__FILE__) . '/test.txt.gz', 'w');
        !             9: fwrite($a, "This is quite the thing ain't it\n");
        !            10: fclose($a);
        !            11: 
        !            12: $fp = fopen(dirname(__FILE__) . '/test.txt.gz', 'r');
        !            13: stream_filter_append($fp, 'zlib.inflate', STREAM_FILTER_READ);
        !            14: echo fread($fp, 2000);
        !            15: fclose($fp);
        !            16: echo "1\n";
        !            17: $fp = fopen(dirname(__FILE__) . '/test.txt.gz', 'r');
        !            18: // zlib format
        !            19: $fp = fopen(dirname(__FILE__) . '/test.txt.gz', 'r');
        !            20: stream_filter_append($fp, 'zlib.inflate', STREAM_FILTER_READ, array('window' => 15+16));
        !            21: echo "2\n";
        !            22: echo fread($fp, 2000);
        !            23: fclose($fp);
        !            24: // auto-detect
        !            25: $fp = fopen(dirname(__FILE__) . '/test.txt.gz', 'r');
        !            26: stream_filter_append($fp, 'zlib.inflate', STREAM_FILTER_READ, array('window' => 15+32));
        !            27: echo "3\n";
        !            28: echo fread($fp, 2000);
        !            29: fclose($fp);
        !            30: 
        !            31: ?>
        !            32: --CLEAN--
        !            33: <?php
        !            34: @unlink(dirname(__FILE__) . '/test.txt.gz');
        !            35: ?>
        !            36: --EXPECT--
        !            37: 1
        !            38: 2
        !            39: This is quite the thing ain't it
        !            40: 3
        !            41: This is quite the thing ain't it

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