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',
45 plan tests => @versions * 2 + 1;
49 $cmp = 'gt' if not defined $cmp;
50 return system('dpkg','--compare-versions',$a,$cmp,$b) == 0;
54 use_ok('Debbugs::Versions::Dpkg');
56 for my $version_cmp (@versions) {
57 ok(Debbugs::Versions::Dpkg::vercmp($$version_cmp{a},$$version_cmp{b}) == $$version_cmp{result},
58 "Version $$version_cmp{a} $$version_cmp{relation} $$version_cmp{b} ok");
59 ok(dpkg_vercmp($$version_cmp{a},$$version_cmp{b},$$version_cmp{relation}),
60 "Dpkg concures: Version $$version_cmp{a} $$version_cmp{relation} $$version_cmp{b}");