Annotation of embedaddon/php/ext/zlib/tests/gzopen_variation8.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Test gzopen() function : variation: opening a plain file
! 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() : variation ***\n";
! 18:
! 19: $data = <<<EOT
! 20: Here is some plain
! 21: text to be read
! 22: and displayed.
! 23: EOT;
! 24:
! 25: $file = "gzopen_variation8.tmp";
! 26: $h = fopen($file, 'w');
! 27: fwrite($h, $data);
! 28: fclose($h);
! 29:
! 30: $h = gzopen($file, 'r');
! 31: gzpassthru($h);
! 32: gzclose($h);
! 33: echo "\n";
! 34: unlink($file);
! 35: ?>
! 36: ===DONE===
! 37: --EXPECT--
! 38: *** Testing gzopen() : variation ***
! 39: Here is some plain
! 40: text to be read
! 41: and displayed.
! 42: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>