3 if (! eval { require Test::More; 1 }) {
4 printf "1..1\nok 1 # Test::More not available: skipping %s\n", __FILE__;
8 Test::More->import(tests => 8);
10 # use this first to $CPAN::term can be undefined
12 $CPAN::Suppress_readline = $CPAN::Suppress_readline; # silence
13 $CPAN::META = $CPAN::META; # silence
14 $CPAN::term = $CPAN::term; # silence
17 # this kicks off all the magic
18 use_ok( 'CPAN::Nox' );
20 # this will be set if $CPAN::term is undefined
21 is( $CPAN::Suppress_readline, 1, 'should set suppress readline flag' );
23 # all of these modules have XS components, should be marked unavailable
25 for $mod (qw( Digest::MD5 LWP Compress::Zlib )) {
26 is( $CPAN::META->has_inst($mod), 0, "$mod should be marked unavailable" );
29 # and these will be set to those in CPAN
30 is( scalar @CPAN::Nox::EXPORT, scalar @CPAN::EXPORT, 'should export just what CPAN does' );
31 is( \&CPAN::Nox::AUTOLOAD, \&CPAN::AUTOLOAD, 'AUTOLOAD should be aliased' );
35 # cperl-indent-level: 2