| Line | |
|---|
| 1 | #!./perl
|
|---|
| 2 |
|
|---|
| 3 | use lib "BUNDLE";
|
|---|
| 4 | use Test::More tests => 8;
|
|---|
| 5 |
|
|---|
| 6 | # use this first to $CPAN::term can be undefined
|
|---|
| 7 | use_ok( 'CPAN' );
|
|---|
| 8 | $CPAN::Suppress_readline = $CPAN::Suppress_readline; # silence
|
|---|
| 9 | $CPAN::META = $CPAN::META; # silence
|
|---|
| 10 | $CPAN::term = $CPAN::term; # silence
|
|---|
| 11 | undef $CPAN::term;
|
|---|
| 12 |
|
|---|
| 13 | # this kicks off all the magic
|
|---|
| 14 | use_ok( 'CPAN::Nox' );
|
|---|
| 15 |
|
|---|
| 16 | # this will be set if $CPAN::term is undefined
|
|---|
| 17 | is( $CPAN::Suppress_readline, 1, 'should set suppress readline flag' );
|
|---|
| 18 |
|
|---|
| 19 | # all of these modules have XS components, should be marked unavailable
|
|---|
| 20 | for my $mod (qw( Digest::MD5 LWP Compress::Zlib )) {
|
|---|
| 21 | is( $CPAN::META->has_inst($mod), 0, "$mod should be marked unavailable" );
|
|---|
| 22 | }
|
|---|
| 23 |
|
|---|
| 24 | # and these will be set to those in CPAN
|
|---|
| 25 | is( @CPAN::Nox::EXPORT, @CPAN::EXPORT, 'should export just what CPAN does' );
|
|---|
| 26 | is( \&CPAN::Nox::AUTOLOAD, \&CPAN::AUTOLOAD, 'AUTOLOAD should be aliased' );
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.