blob: 909ad0f7a60328395a26ad6a69dd3b86d44e5818 (
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"; ?>
--FILE--
<?php
var_dump(rpmvercmp("1.0", "1.1"));
var_dump(rpmvercmp("1.1", "1.0"));
var_dump(rpmvercmp("1.0", "1.0"));
var_dump(rpmvercmp("2.0.14-22.el7_0", "2.0.14.1-35.el7_6"));
// Errors
var_dump(rpmvercmp());
var_dump(rpmvercmp("a"));
var_dump(rpmvercmp("a", "b", "c"));
?>
Done
--EXPECTF--
int(-1)
int(1)
int(0)
int(-1)
Warning: rpmvercmp() expects exactly 2 parameters, 0 given in %s/002-rpmvercmp.php on line %d
NULL
Warning: rpmvercmp() expects exactly 2 parameters, 1 given in %s/002-rpmvercmp.php on line %d
NULL
Warning: rpmvercmp() expects exactly 2 parameters, 3 given in %s/002-rpmvercmp.php on line %d
NULL
Done
|