xref: /PHP-5.6/ext/zlib/tests/gzseek_error.phpt (revision 8f9ec423)
1--TEST--
2Test function gzseek() by calling it more than or less than its expected arguments
3--SKIPIF--
4<?php
5if (!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
17var_dump(gzseek( $h, $offset, $whence, $extra_arg ) );
18var_dump(gzseek($h));
19var_dump(gzseek());
20
21?>
22===DONE===
23--EXPECTF--
24
25Warning: gzseek() expects at most 3 parameters, 4 given in %s on line %d
26bool(false)
27
28Warning: gzseek() expects at least 2 parameters, 1 given in %s on line %d
29bool(false)
30
31Warning: gzseek() expects at least 2 parameters, 0 given in %s on line %d
32bool(false)
33===DONE===