12 my @versions = ({a => '1.0-1',
32 # q(1.1-20080727-1),q(1.1-20080316-1)
33 {a => '1.1-20080727-1',
34 b => '1.1-20080316-1',
38 {a => '1.1-20080316-1',
39 b => '1.1-20080727-1',
55 plan tests => @versions * 2 + 1;
59 $cmp = 'gt' if not defined $cmp;
60 return system('dpkg','--compare-versions',$a,$cmp,$b) == 0;
64 use_ok('Debbugs::Versions::Dpkg');
66 for my $version_cmp (@versions) {
67 ok(Debbugs::Versions::Dpkg::vercmp($$version_cmp{a},$$version_cmp{b}) == $$version_cmp{result},
68 "Version $$version_cmp{a} $$version_cmp{relation} $$version_cmp{b} ok");
69 ok(dpkg_vercmp($$version_cmp{a},$$version_cmp{b},$$version_cmp{relation}),
70 "Dpkg concures: Version $$version_cmp{a} $$version_cmp{relation} $$version_cmp{b}");