X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FCPANPLUS-Dist-Gentoo.git;a=blobdiff_plain;f=t%2F31-atom-cmp.t;h=9422071f4e8481832a156a133f8e47a713962ff3;hp=580101012b763481acef6c3af74bd2358c0da027;hb=f1e11349a9e94499b1025601c2f7e4c73e18810e;hpb=224b04a18dc0a67240dc93d03b04f8804bf1bc91 diff --git a/t/31-atom-cmp.t b/t/31-atom-cmp.t index 5801010..9422071 100644 --- a/t/31-atom-cmp.t +++ b/t/31-atom-cmp.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 2 * 5 * ((8 * 7) / 2); +use Test::More tests => 2 * 8 * ((8 * 7) / 2); use CPANPLUS::Dist::Gentoo::Atom; @@ -128,7 +128,8 @@ for my $t (@tests) { my $bs = "$b"; compare_ok($a, '<=>', $bs, $exp); - if (my $bv = $b->version) { + my $bv = $b->version; + if (defined $bv) { compare_ok($a, '<=>', $bv, $exp); compare_ok($a, '<=>', "$bv", $exp); } else { @@ -136,5 +137,14 @@ for my $t (@tests) { } compare_ok($a, 'cmp', $b, $exp); + + my $bz = $b->qualified_name; + $bz .= "-$bv" if defined $bv; + compare_ok($a, 'cmp', $bz, $exp); + + $bz = "test/zzz"; + $bz .= "-$bv" if defined $bv; + compare_ok($a, 'cmp', $bz, -1); + compare_ok($bz, 'cmp', $b, 1); } }