summaryrefslogtreecommitdiff
path: root/lib/CPAN/t
diff options
context:
space:
mode:
authorSteve Peters <steve@fisharerojo.org>2005-11-06 20:18:23 +0000
committerSteve Peters <steve@fisharerojo.org>2005-11-06 20:18:23 +0000
commit0a78cd5d546a6120b099fe63d90fd0c2559380f5 (patch)
tree0d17db5f2126c8995eea0b8dddba27680caaf993 /lib/CPAN/t
parent52a5c5170563b6471b4be61ccf3752d0221efee6 (diff)
downloadperl-0a78cd5d546a6120b099fe63d90fd0c2559380f5.tar.gz
Upgrade to CPAN-1.76_61
p4raw-id: //depot/perl@26023
Diffstat (limited to 'lib/CPAN/t')
-rw-r--r--lib/CPAN/t/Nox.t13
-rw-r--r--lib/CPAN/t/vcmp.t4
-rw-r--r--lib/CPAN/t/version.t12
3 files changed, 22 insertions, 7 deletions
diff --git a/lib/CPAN/t/Nox.t b/lib/CPAN/t/Nox.t
index 990906b7af..90c1b3e063 100644
--- a/lib/CPAN/t/Nox.t
+++ b/lib/CPAN/t/Nox.t
@@ -1,7 +1,11 @@
#!./perl
-use lib "BUNDLE";
-use Test::More tests => 8;
+if (! eval { require Test::More; 1 }) {
+ printf "1..1\nok 1 # Test::More not available: skipping %s\n", __FILE__;
+ exit;
+}
+require Test::More;
+Test::More->import(tests => 8);
# use this first to $CPAN::term can be undefined
use_ok( 'CPAN' );
@@ -17,12 +21,13 @@ use_ok( 'CPAN::Nox' );
is( $CPAN::Suppress_readline, 1, 'should set suppress readline flag' );
# all of these modules have XS components, should be marked unavailable
-for my $mod (qw( Digest::MD5 LWP Compress::Zlib )) {
+my $mod;
+for $mod (qw( Digest::MD5 LWP Compress::Zlib )) {
is( $CPAN::META->has_inst($mod), 0, "$mod should be marked unavailable" );
}
# and these will be set to those in CPAN
-is( @CPAN::Nox::EXPORT, @CPAN::EXPORT, 'should export just what CPAN does' );
+is( scalar @CPAN::Nox::EXPORT, scalar @CPAN::EXPORT, 'should export just what CPAN does' );
is( \&CPAN::Nox::AUTOLOAD, \&CPAN::AUTOLOAD, 'AUTOLOAD should be aliased' );
# Local Variables:
diff --git a/lib/CPAN/t/vcmp.t b/lib/CPAN/t/vcmp.t
index 11bae38d2b..a04b4238ac 100644
--- a/lib/CPAN/t/vcmp.t
+++ b/lib/CPAN/t/vcmp.t
@@ -5,7 +5,7 @@ use CPAN::Version;
use vars qw($D $N);
while (<DATA>) {
- next if /^v/ && $]<5.006; # v-string tests are not for pre-5.6.0
+ next if tr/.// > 1 && $]<5.006; # multidot tests are not for pre-5.6.0
last if /^__END__$/;
chomp;
s/\s*#.*//;
@@ -22,7 +22,7 @@ while (@$D) {
print "# l[$l]r[$r]exp[$exp]res[$res]\n";
print "not ";
}
- print "ok ", $N-@$D, "\n";
+ printf "ok %2d # %12s %12s %3d\n", $N-@$D, $l, $r, $res;
}
__END__
diff --git a/lib/CPAN/t/version.t b/lib/CPAN/t/version.t
index d313cec042..01de0069e4 100644
--- a/lib/CPAN/t/version.t
+++ b/lib/CPAN/t/version.t
@@ -1,11 +1,21 @@
# test if our own version numbers meet expectations
-my @m = qw(CPAN CPAN::FirstTime CPAN::Nox);
+BEGIN {
+ if (! eval { require warnings; 1 }) {
+ printf "1..1\nok 1 # warnings not available: skipping %s\n", __FILE__;
+ exit;
+ }
+}
+
+use strict;
+use warnings;
+my @m = qw(CPAN CPAN::Admin CPAN::FirstTime CPAN::Nox CPAN::Version);
use Test::More;
plan(tests => scalar @m);
for my $m (@m) {
+ local $^W = 0;
eval "require $m";
ok($m->VERSION >= 1.76, sprintf "%20s: %s", $m, $m->VERSION);
}