CPAN

 view release on metacpan or  search on metacpan

t/97-install_hack.t  view on Meta::CPAN

use Test::More qw(no_plan);

my $class  = 'App::Cpan';
my $method = '_stupid_interface_hack_for_non_rtfmers';

use_ok( $class );
can_ok( $class, $method );


@pairs = (
		#before		        after
	[ 'Nothing to nothing',                 [],                        []                 ],
	[ 'Starts with install, then nothing',  [ qw(install) ],           [qw(install)]      ],
	[ 'Starts with install, then module',   [ qw(install Foo::Bar) ],  [qw(Foo::Bar)]     ],
	[ 'Starts with -i, then install',       [ qw(-i install) ],        [ qw(-i install) ] ],
	);


foreach my $pair ( @pairs ) {
	local @ARGV = @{ $pair->[1] };

	$class->$method;

	is_deeply( \@ARGV, $pair->[2], $pair->[0] );
	}

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.444 second using v1.00-cache-2.02-grep-82fe00e-cpan-2c419f77a38b )