Typo fix in overload docs
[p5sagit/p5-mst-13.2.git] / lib / CPAN / t / 02nox.t
CommitLineData
149e6985 1#!./perl
2
0a78cd5d 3if (! eval { require Test::More; 1 }) {
4 printf "1..1\nok 1 # Test::More not available: skipping %s\n", __FILE__;
5 exit;
6}
7require Test::More;
8Test::More->import(tests => 8);
149e6985 9
10# use this first to $CPAN::term can be undefined
11use_ok( 'CPAN' );
5fc0f0f6 12$CPAN::Suppress_readline = $CPAN::Suppress_readline; # silence
13$CPAN::META = $CPAN::META; # silence
14$CPAN::term = $CPAN::term; # silence
149e6985 15undef $CPAN::term;
16
17# this kicks off all the magic
18use_ok( 'CPAN::Nox' );
19
20# this will be set if $CPAN::term is undefined
21is( $CPAN::Suppress_readline, 1, 'should set suppress readline flag' );
22
23# all of these modules have XS components, should be marked unavailable
0a78cd5d 24my $mod;
25for $mod (qw( Digest::MD5 LWP Compress::Zlib )) {
149e6985 26 is( $CPAN::META->has_inst($mod), 0, "$mod should be marked unavailable" );
27}
28
29# and these will be set to those in CPAN
0a78cd5d 30is( scalar @CPAN::Nox::EXPORT, scalar @CPAN::EXPORT, 'should export just what CPAN does' );
149e6985 31is( \&CPAN::Nox::AUTOLOAD, \&CPAN::AUTOLOAD, 'AUTOLOAD should be aliased' );
554a9ef5 32
33# Local Variables:
34# mode: cperl
35# cperl-indent-level: 2
36# End: