Annotation of embedaddon/php/ext/zlib/tests/gzopen_basic.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Test gzopen() function : basic functionality
! 3: --SKIPIF--
! 4: <?php
! 5: if (!extension_loaded("zlib")) {
! 6: print "skip - ZLIB extension not loaded";
! 7: }
! 8: ?>
! 9: --FILE--
! 10: <?php
! 11: /* Prototype : resource gzopen(string filename, string mode [, int use_include_path])
! 12: * Description: Open a .gz-file and return a .gz-file pointer
! 13: * Source code: ext/zlib/zlib.c
! 14: * Alias to functions:
! 15: */
! 16:
! 17: echo "*** Testing gzopen() : basic functionality ***\n";
! 18:
! 19:
! 20: // Initialise all required variables
! 21: $filename = dirname(__FILE__)."/004.txt.gz";
! 22: $mode = 'r';
! 23: $use_include_path = false;
! 24:
! 25: // Calling gzopen() with all possible arguments
! 26: $h = gzopen($filename, $mode, $use_include_path);
! 27: gzpassthru($h);
! 28: gzclose($h);
! 29:
! 30: // Calling gzopen() with mandatory arguments
! 31: $h = gzopen($filename, $mode);
! 32: gzpassthru($h);
! 33: gzclose($h);
! 34:
! 35: ?>
! 36: ===DONE===
! 37: --EXPECTF--
! 38: *** Testing gzopen() : basic functionality ***
! 39: When you're taught through feelings
! 40: Destiny flying high above
! 41: all I know is that you can realize it
! 42: Destiny who cares
! 43: as it turns around
! 44: and I know that it descends down on me
! 45: When you're taught through feelings
! 46: Destiny flying high above
! 47: all I know is that you can realize it
! 48: Destiny who cares
! 49: as it turns around
! 50: and I know that it descends down on me
! 51: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>