Skip to content

Commit

Permalink
Debug refresh_list() re situation where an item in the list is not fo…
Browse files Browse the repository at this point in the history
…und in the repository -- and is therefore removed from the list.
  • Loading branch information
jkeenan committed Feb 24, 2010
1 parent b89e082 commit b4c6190
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
1 change: 1 addition & 0 deletions lib/CPAN/Mini/Visit/Simple.pm
Expand Up @@ -18,6 +18,7 @@ use CPAN::Mini::Visit::Simple::Auxiliary qw(
get_lookup_table
normalize_version_number
);
#use Data::Dumper;$Data::Dumper::Indent=1;

sub new {
my ($class, $args) = @_;
Expand Down
1 change: 1 addition & 0 deletions lib/CPAN/Mini/Visit/Simple/Auxiliary.pm
Expand Up @@ -10,6 +10,7 @@ our @EXPORT_OK = qw(
normalize_version_number
create_minicpan_for_testing
create_one_new_distro_version
create_file
);
use Carp;
use File::Basename;
Expand Down
3 changes: 1 addition & 2 deletions t/001_new.t
Expand Up @@ -7,8 +7,7 @@ use Carp;
use File::Path qw( make_path );
use File::Spec;
use File::Temp qw( tempdir );
use Test::More qw(no_plan); # tests => 5;
use Data::Dumper;$Data::Dumper::Indent=1;
use Test::More tests => 11;

BEGIN { use_ok( 'CPAN::Mini::Visit::Simple' ); }

Expand Down
13 changes: 5 additions & 8 deletions t/006_refresh_list.t
Expand Up @@ -7,10 +7,12 @@ use CPAN::Mini::Visit::Simple;
use CPAN::Mini::Visit::Simple::Auxiliary qw(
create_minicpan_for_testing
create_one_new_distro_version
create_file
);
use Carp;
use File::Spec;
use Test::More tests => 39;
use Test::More tests => 38;
#use Data::Dumper;$Data::Dumper::Indent=1;

{
my ($tdir, $author_dir) = create_minicpan_for_testing();
Expand Down Expand Up @@ -96,13 +98,8 @@ use Test::More tests => 39;
# minicpan, it should not be included in the list generated by the
# operation of refresh_list().

my $update = q{Eta-Theta-0.05.tar.gz};
my $updated_file = File::Spec->catfile($author_dir, $update);
open my $FH, '>', $updated_file
or croak "Unable to open handle to $update for writing";
say $FH q{};
close $FH or croak "Unable to close handle to $update after writing";
ok( ( -f $updated_file ), "$updated_file created" );
my $stray = File::Spec->catfile( $author_dir, 'Iota-Kappa-0.06.tar.gz' );
push @{$old_primary_list_ref}, $stray;

my $refreshed_list_ref = $self->refresh_list( {
derived_list => $old_primary_list_ref,
Expand Down

0 comments on commit b4c6190

Please sign in to comment.