Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test files to test dedupe_superseded() and normalize_version_numb…
…er(). Extensive debugging of the latter.
- Loading branch information
Showing
5 changed files
with
403 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# -*- perl -*- | ||
|
||
# t/003_dedupe_superseded.t | ||
|
||
use CPAN::Mini::Visit::Simple::Auxiliary qw( | ||
dedupe_superseded | ||
); | ||
use Test::More tests => 2; | ||
|
||
my $topdir = q{/minicpan/authors/id/D/DR/DROLSKY}; | ||
my (@list, $newlist_ref, $expected); | ||
|
||
@list = ( | ||
qq{$topdir/Class-MOP-0.82.tar.gz}, | ||
qq{$topdir/Class-MOP-0.88.tar.gz}, | ||
qq{$topdir/Class-MOP-0.98.tar.gz}, | ||
qq{$topdir/Class-MOP-0.78.tar.gz}, | ||
qq{$topdir/Sig-PackageScoped-0.04.tar.gz}, | ||
qq{$topdir/SmokeRunner-Multi-0.13.tar.gz}, | ||
qq{$topdir/SmokeRunner-Multi-0.14.tar.gz}, | ||
qq{$topdir/SmokeRunner-Multi-0.01.tar.gz}, | ||
qq{$topdir/SmokeRunner-Multi-0.16.tar.gz}, | ||
qq{$topdir/SmokeRunner-Multi-0.16a.tar.gz}, | ||
); | ||
$newlist_ref = dedupe_superseded(\@list); | ||
|
||
$expected = [ | ||
'/minicpan/authors/id/D/DR/DROLSKY/Class-MOP-0.98.tar.gz', | ||
'/minicpan/authors/id/D/DR/DROLSKY/Sig-PackageScoped-0.04.tar.gz', | ||
'/minicpan/authors/id/D/DR/DROLSKY/SmokeRunner-Multi-0.16.tar.gz', | ||
'/minicpan/authors/id/D/DR/DROLSKY/SmokeRunner-Multi-0.16a.tar.gz' | ||
]; | ||
is_deeply( $newlist_ref, $expected, | ||
"Got expected deduped list" ); | ||
|
||
@list = ( | ||
qq{$topdir/Class-MOP-0.82.tar.gz}, | ||
qq{$topdir/Class-MOP-0.88.tar.gz}, | ||
qq{$topdir/Class-MOP-0.98.tar.gz}, | ||
qq{$topdir/Class-MOP-1.78.tar.gz}, | ||
qq{$topdir/Sig-PackageScoped-0.04.tar.gz}, | ||
qq{$topdir/SmokeRunner-Multi-0.13.tar.gz}, | ||
qq{$topdir/SmokeRunner-Multi-0.14.tar.gz}, | ||
qq{$topdir/SmokeRunner-Multi-0.01.tar.gz}, | ||
qq{$topdir/SmokeRunner-Multi-0.16.tar.gz}, | ||
qq{$topdir/SmokeRunner-Multi-0.16a.tar.gz}, | ||
); | ||
$newlist_ref = dedupe_superseded(\@list); | ||
|
||
$expected = [ | ||
'/minicpan/authors/id/D/DR/DROLSKY/Class-MOP-1.78.tar.gz', | ||
'/minicpan/authors/id/D/DR/DROLSKY/Sig-PackageScoped-0.04.tar.gz', | ||
'/minicpan/authors/id/D/DR/DROLSKY/SmokeRunner-Multi-0.16.tar.gz', | ||
'/minicpan/authors/id/D/DR/DROLSKY/SmokeRunner-Multi-0.16a.tar.gz' | ||
]; | ||
is_deeply( $newlist_ref, $expected, | ||
"Got expected deduped list" ); |
Oops, something went wrong.