Annotation of embedaddon/php/ext/zlib/tests/gzseek_error.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Test function gzseek() by calling it more than or less than 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: $f = dirname(__FILE__)."/004.txt.gz";
! 12: $h = gzopen($f, 'r');
! 13: $offset = 1;
! 14: $whence = SEEK_SET;
! 15: $extra_arg = 'nothing';
! 16:
! 17: var_dump(gzseek( $h, $offset, $whence, $extra_arg ) );
! 18: var_dump(gzseek($h));
! 19: var_dump(gzseek());
! 20:
! 21: ?>
! 22: ===DONE===
! 23: --EXPECTF--
! 24:
! 25: Warning: gzseek() expects at most 3 parameters, 4 given in %s on line %d
! 26: bool(false)
! 27:
! 28: Warning: gzseek() expects at least 2 parameters, 1 given in %s on line %d
! 29: bool(false)
! 30:
! 31: Warning: gzseek() expects at least 2 parameters, 0 given in %s on line %d
! 32: bool(false)
! 33: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>