From 97b001f8bd05dd1dab189fdda8c02f9dd998827d Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 10 Mar 2020 11:32:27 +0100 Subject: fix rpmvercmp logic --- tests/002-rpmvercmp.phpt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/002-rpmvercmp.phpt b/tests/002-rpmvercmp.phpt index 6cffef0..909ad0f 100644 --- a/tests/002-rpmvercmp.phpt +++ b/tests/002-rpmvercmp.phpt @@ -7,6 +7,7 @@ Check for rpmvercmp function 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")); @@ -17,13 +18,14 @@ Done int(-1) int(1) int(0) +int(-1) -Warning: rpmvercmp() expects exactly 2 parameters, 0 given in %s/002-rpmvercmp.php on line 6 +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 7 +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 8 +Warning: rpmvercmp() expects exactly 2 parameters, 3 given in %s/002-rpmvercmp.php on line %d NULL Done -- cgit