blob: 3db3564f6341303069a45096b218542d8fba5332 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
--TEST--
Check for rpmvercmp function
--SKIPIF--
<?php
if (!extension_loaded("rpminfo")) print "skip";
if (PHP_VERSION_ID < 80000) print "skip only for PHP 8";
?>
--FILE--
<?php
try {
var_dump(rpmvercmp());
} catch (ArgumentCountError $e) {
echo $e->getMessage(), "\n";
}
try {
var_dump(rpmvercmp("a"));
} catch (ArgumentCountError $e) {
echo $e->getMessage(), "\n";
}
try {
var_dump(rpmvercmp("a", "b", "c"));
} catch (ArgumentCountError $e) {
echo $e->getMessage(), "\n";
}
?>
Done
--EXPECTF--
rpmvercmp() expects exactly 2 parameters, 0 given
rpmvercmp() expects exactly 2 parameters, 1 given
rpmvercmp() expects exactly 2 parameters, 3 given
Done
|