summaryrefslogtreecommitdiff
path: root/lib/ExtUtils/t
diff options
context:
space:
mode:
authorSteve Peters <steve@fisharerojo.org>2006-04-27 18:06:12 +0000
committerSteve Peters <steve@fisharerojo.org>2006-04-27 18:06:12 +0000
commit3a465856879d8f5c62068f777bdbd4b60c7e7eb4 (patch)
tree7b936e8fea2045808921a98ebaa092d84e048f7a /lib/ExtUtils/t
parent0a8c69ed98534e4cb5df7fb14bb378b3457ef4ef (diff)
downloadperl-3a465856879d8f5c62068f777bdbd4b60c7e7eb4.tar.gz
Upgrade to ExtUtils-Install-1.39
p4raw-id: //depot/perl@27983
Diffstat (limited to 'lib/ExtUtils/t')
-rw-r--r--lib/ExtUtils/t/Install.t5
-rw-r--r--lib/ExtUtils/t/Installed.t44
-rw-r--r--lib/ExtUtils/t/Packlist.t10
3 files changed, 30 insertions, 29 deletions
diff --git a/lib/ExtUtils/t/Install.t b/lib/ExtUtils/t/Install.t
index 6058811c26..dacc3fb823 100644
--- a/lib/ExtUtils/t/Install.t
+++ b/lib/ExtUtils/t/Install.t
@@ -17,7 +17,7 @@ use TieOut;
use File::Path;
use File::Spec;
-use Test::More tests => 32;
+use Test::More tests => 33;
use MakeMaker::Test::Setup::BFD;
@@ -72,13 +72,14 @@ install( { 'blib/lib' => 'install-test/lib/perl',
} );
ok( -d 'install-test/lib/perl', 'install made dir' );
ok( -r 'install-test/lib/perl/Big/Dummy.pm', ' .pm file installed' );
+ok(!-r 'install-test/lib/perl/Big/Dummy.SKIP', ' ignored .SKIP file' );
ok( -r 'install-test/packlist', ' packlist exists' );
open(PACKLIST, 'install-test/packlist' );
my %packlist = map { chomp; ($_ => 1) } <PACKLIST>;
close PACKLIST;
-# On case-insensitive filesystems (ie. VMS), the keys of the packlist might
+# On case-insensitive filesystems (ie. VMS), the keys of the packlist might
# be lowercase. :(
my $native_dummy = File::Spec->catfile(qw(install-test lib perl Big Dummy.pm));
is( keys %packlist, 1 );
diff --git a/lib/ExtUtils/t/Installed.t b/lib/ExtUtils/t/Installed.t
index ba35deb691..c18e8b049f 100644
--- a/lib/ExtUtils/t/Installed.t
+++ b/lib/ExtUtils/t/Installed.t
@@ -53,7 +53,7 @@ foreach my $path (qw( man1dir man3dir )) {
# VMS 5.6.1 doesn't seem to have $Config{prefixexp}
my $prefix = $Config{prefix} || $Config{prefixexp};
-# You can concatenate /foo but not foo:, which defaults in the current
+# You can concatenate /foo but not foo:, which defaults in the current
# directory
$prefix = VMS::Filespec::unixify($prefix) if $Is_VMS;
@@ -65,7 +65,7 @@ ok( $ei->_is_type( File::Spec->catfile($prefix, 'bar'), 'prog'),
SKIP: {
skip('no man directories on this system', 1) unless $mandirs;
- is( $ei->_is_type('bar', 'doc'), 0,
+ is( $ei->_is_type('bar', 'doc'), 0,
'... should not find doc file outside path' );
}
@@ -116,31 +116,31 @@ close FAKEMOD;
my $realei = ExtUtils::Installed->new();
isa_ok( $realei, 'ExtUtils::Installed' );
isa_ok( $realei->{Perl}{packlist}, 'ExtUtils::Packlist' );
- is( $realei->{Perl}{version}, $Config{version},
+ is( $realei->{Perl}{version}, $Config{version},
'new() should set Perl version from %Config' );
ok( exists $realei->{FakeMod}, 'new() should find modules with .packlists');
isa_ok( $realei->{FakeMod}{packlist}, 'ExtUtils::Packlist' );
- is( $realei->{FakeMod}{version}, '1.1.1',
+ is( $realei->{FakeMod}{version}, '1.1.1',
'... should find version in modules' );
}
# modules
$ei->{$_} = 1 for qw( abc def ghi );
-is( join(' ', $ei->modules()), 'abc def ghi',
+is( join(' ', $ei->modules()), 'abc def ghi',
'modules() should return sorted keys' );
# This didn't work for a long time due to a sort in scalar context oddity.
is( $ei->modules, 3, 'modules() in scalar context' );
# files
-$ei->{goodmod} = {
- packlist => {
- ($Config{man1direxp} ?
- (File::Spec->catdir($Config{man1direxp}, 'foo') => 1) :
+$ei->{goodmod} = {
+ packlist => {
+ ($Config{man1direxp} ?
+ (File::Spec->catdir($Config{man1direxp}, 'foo') => 1) :
()),
- ($Config{man3direxp} ?
- (File::Spec->catdir($Config{man3direxp}, 'bar') => 1) :
+ ($Config{man3direxp} ?
+ (File::Spec->catdir($Config{man3direxp}, 'bar') => 1) :
()),
File::Spec->catdir($prefix, 'foobar') => 1,
foobaz => 1,
@@ -154,8 +154,8 @@ like( $@, qr/type must be/,'files() should croak given bad type' );
my @files;
SKIP: {
- skip('no man directory man1dir on this system', 2)
- unless $Config{man1direxp};
+ skip('no man directory man1dir on this system', 2)
+ unless $Config{man1direxp};
@files = $ei->files('goodmod', 'doc', $Config{man1direxp});
is( scalar @files, 1, '... should find doc file under given dir' );
is( (grep { /foo$/ } @files), 1, '... checking file name' );
@@ -190,22 +190,22 @@ is( scalar @dirs, 2 + $mandirs, '... should find all files files() would, again'
is( join(' ', @files), join(' ', @dirs), '... should sort output' );
# directory_tree
-my $expectdirs =
- ($mandirs == 2) &&
+my $expectdirs =
+ ($mandirs == 2) &&
(dirname($Config{man1direxp}) eq dirname($Config{man3direxp}))
? 3 : 2;
-
+
SKIP: {
skip('no man directories on this system', 1) unless $mandirs;
@dirs = $ei->directory_tree('goodmod', 'doc', $Config{man1direxp} ?
dirname($Config{man1direxp}) : dirname($Config{man3direxp}));
- is( scalar @dirs, $expectdirs,
+ is( scalar @dirs, $expectdirs,
'directory_tree() should report intermediate dirs to those requested' );
}
my $fakepak = Fakepak->new(102);
-$ei->{yesmod} = {
+$ei->{yesmod} = {
version => 101,
packlist => $fakepak,
};
@@ -213,20 +213,20 @@ $ei->{yesmod} = {
# these should all croak
foreach my $sub (qw( validate packlist version )) {
eval { $ei->$sub('nomod') };
- like( $@, qr/nomod is not installed/,
+ like( $@, qr/nomod is not installed/,
"$sub() should croak when asked about uninstalled module" );
}
# validate
-is( $ei->validate('yesmod'), 'validated',
+is( $ei->validate('yesmod'), 'validated',
'validate() should return results of packlist validate() call' );
# packlist
-is( ${ $ei->packlist('yesmod') }, 102,
+is( ${ $ei->packlist('yesmod') }, 102,
'packlist() should report installed mod packlist' );
# version
-is( $ei->version('yesmod'), 101,
+is( $ei->version('yesmod'), 101,
'version() should report installed mod version' );
diff --git a/lib/ExtUtils/t/Packlist.t b/lib/ExtUtils/t/Packlist.t
index 58eaf8f679..cb73e00d14 100644
--- a/lib/ExtUtils/t/Packlist.t
+++ b/lib/ExtUtils/t/Packlist.t
@@ -39,7 +39,7 @@ is( ExtUtils::Packlist::FETCH($pl, 'foo'), 'bar', 'check FETCH()' );
# test FIRSTKEY and NEXTKEY
SKIP: {
$pl->{data}{bar} = 'baz';
- skip('not enough keys to test FIRSTKEY', 2)
+ skip('not enough keys to test FIRSTKEY', 2)
unless keys %{ $pl->{data} } > 2;
# get the first and second key
@@ -50,9 +50,9 @@ SKIP: {
for (keys %{ $pl->{data} } ) {
last if $i++;
}
-
+
# finally, see if it really can get the first key again
- is( ExtUtils::Packlist::FIRSTKEY($pl), $first,
+ is( ExtUtils::Packlist::FIRSTKEY($pl), $first,
'FIRSTKEY() should be consistent' );
is( ExtUtils::Packlist::NEXTKEY($pl), $second,
@@ -155,9 +155,9 @@ SKIP: {
is( ExtUtils::Packlist::validate($pl), 1,
'validate() should find missing files' );
ExtUtils::Packlist::validate($pl, 1);
- ok( !exists $pl->{data}{fake},
+ ok( !exists $pl->{data}{fake},
'validate() should remove missing files when prompted' );
-
+
# one more new() test, to see if it calls read() successfully
$pl = ExtUtils::Packlist->new('eplist');
}