From eafee2b9958466622118ada12560eafceaea0ff6 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 24 Jun 2008 09:06:24 +0000 Subject: adapt tests to ->compare change --- t/synthesis.t | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 't') diff --git a/t/synthesis.t b/t/synthesis.t index a16d909..6729b3b 100644 --- a/t/synthesis.t +++ b/t/synthesis.t @@ -2,7 +2,7 @@ use strict ; use warnings ; -use Test::More tests => 88; +use Test::More tests => 94; use URPM; chdir 't' if -d 't'; @@ -98,20 +98,26 @@ my @files = $pkg->files; ok(@files == 0); ok($pkg->compare("6:2.2.4-25mdk") == 0); -ok($pkg->compare("2.2.4-25mdk") == 0); -ok($pkg->compare("2.2.4") == 0); +ok($pkg->compare("2.2.4-25mdk") > 0); +ok($pkg->compare("6:2.2.4") == 0); ok($pkg->compare("2.2.3") > 0); ok($pkg->compare("2.2") > 0); ok($pkg->compare("2") > 0); -ok($pkg->compare("2.2.4.0") < 0); -ok($pkg->compare("2.2.5") < 0); +ok($pkg->compare("2.2.4.0") > 0); +ok($pkg->compare("2.2.5") > 0); ok($pkg->compare("2.1.7") > 0); -ok($pkg->compare("2.3.1") < 0); -ok($pkg->compare("2.2.31") < 0); +ok($pkg->compare("2.3.1") > 0); +ok($pkg->compare("2.2.31") > 0); ok($pkg->compare("2.2.4-25") > 0); -ok($pkg->compare("2.2.4-25.1mdk") < 0); +ok($pkg->compare("2.2.4-25.1mdk") > 0); ok($pkg->compare("2.2.4-24mdk") > 0); -ok($pkg->compare("2.2.4-26mdk") < 0); +ok($pkg->compare("2.2.4-26mdk") > 0); +ok($pkg->compare("6:2.2.4-25.1mdk") < 0); +ok($pkg->compare("6:2.2.4.0") < 0); +ok($pkg->compare("6:2.2.5") < 0); +ok($pkg->compare("6:2.2.31") < 0); +ok($pkg->compare("6:2.3.1") < 0); +ok($pkg->compare("6:2.2.4-24mdk") > 0); ok($pkg->compare("6:2.2.4-26mdk") < 0); ok($pkg->compare("7:2.2.4-26mdk") < 0); ok($pkg->compare("7:2.2.4-24mdk") < 0); -- cgit v1.2.1