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