aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPer Øyvind Karlsen <peroyvind@mandriva.org>2009-08-08 15:26:59 +0000
committerPer Øyvind Karlsen <peroyvind@mandriva.org>2009-08-08 15:26:59 +0000
commite0a804d064d5163d22ff1da6d892635135bd33ea (patch)
tree31f59fe3184d62f56b62bc30a818d73ef697a807
parentedd10e245408c33ea9d76ebf56765e960a04b10f (diff)
downloadperl-URPM-e0a804d064d5163d22ff1da6d892635135bd33ea.tar
perl-URPM-e0a804d064d5163d22ff1da6d892635135bd33ea.tar.gz
perl-URPM-e0a804d064d5163d22ff1da6d892635135bd33ea.tar.bz2
perl-URPM-e0a804d064d5163d22ff1da6d892635135bd33ea.tar.xz
perl-URPM-e0a804d064d5163d22ff1da6d892635135bd33ea.zip
add some simple cases using distepoch for testing compare()
-rw-r--r--t/synthesis.t5
1 files changed, 4 insertions, 1 deletions
diff --git a/t/synthesis.t b/t/synthesis.t
index 6729b3b..7001ad2 100644
--- a/t/synthesis.t
+++ b/t/synthesis.t
@@ -2,7 +2,7 @@
use strict ;
use warnings ;
-use Test::More tests => 94;
+use Test::More tests => 97;
use URPM;
chdir 't' if -d 't';
@@ -97,6 +97,7 @@ ok($provides[0] eq 'glibc-devel == 6:2.2.4-25mdk');
my @files = $pkg->files;
ok(@files == 0);
+ok($pkg->compare("6:2.2.4-25mdk:2010.0") < 0);
ok($pkg->compare("6:2.2.4-25mdk") == 0);
ok($pkg->compare("2.2.4-25mdk") > 0);
ok($pkg->compare("6:2.2.4") == 0);
@@ -112,11 +113,13 @@ ok($pkg->compare("2.2.4-25") > 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("6:2.2.4-25.1mdk:2010.0") < 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:2010.0") > 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);