summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2002-05-13 22:45:47 +0100
committerJarkko Hietaniemi <jhi@iki.fi>2002-05-13 23:05:04 +0000
commitccc70a53db4bdfe62527deb9e4c30f19764f9afb (patch)
tree48ce9822547bf7ae4956cd0238a66f5a0d2ab962 /lib
parentab43e786dcd7c253fc4b61a6e15b36c18bb20fa3 (diff)
downloadperl-ccc70a53db4bdfe62527deb9e4c30f19764f9afb.tar.gz
Re: FreeBSD mostly OK. [nwc10@colon.colondot.net: Report /export/home/nwc10/Even-Smoke/Smoke]
Message-ID: <20020513204546.GC310@Bagpuss.unfortu.net> p4raw-id: //depot/perl@16584
Diffstat (limited to 'lib')
-rw-r--r--lib/ExtUtils/t/Constant.t73
1 files changed, 55 insertions, 18 deletions
diff --git a/lib/ExtUtils/t/Constant.t b/lib/ExtUtils/t/Constant.t
index d321b207b1..34f9414d0c 100644
--- a/lib/ExtUtils/t/Constant.t
+++ b/lib/ExtUtils/t/Constant.t
@@ -1,6 +1,6 @@
#!/usr/bin/perl -w
-print "1..48\n";
+print "1..51\n";
BEGIN {
if( $ENV{PERL_CORE} ) {
@@ -509,6 +509,14 @@ EOT
close FH or die "close $makefilePL: $!\n";
+################ MANIFEST
+# We really need a MANIFEST because make distclean checks it.
+my $manifest = catfile($dir, "MANIFEST");
+push @files, "MANIFEST";
+open FH, ">$manifest" or die "open >$manifest: $!\n";
+print FH "$_\n" foreach @files;
+close FH or die "close $manifest: $!\n";
+
chdir $dir or die $!; push @INC, '../../lib';
END {chdir ".." or warn $!};
@@ -529,8 +537,9 @@ if (-f "$makefile$makefile_ext") {
} else {
print "not ok 2\n";
}
-my $makefile_rename = ($^O eq 'VMS' ? '.mms' : '.old');
-push @files, "$makefile$makefile_rename"; # Renamed by make clean
+
+# Renamed by make clean
+my $makefile_rename = $makefile . ($^O eq 'VMS' ? '.mms' : '.old');
my $make = $Config{make};
@@ -568,8 +577,6 @@ if ($Config{usedl}) {
}
}
-push @files, $output;
-
my $maketest = "$make test";
print "# make = '$maketest'\n";
@@ -639,22 +646,52 @@ if ($?) {
}
$test++;
-unless ($keep_files) {
- foreach (@files) {
- unlink $_ or warn "unlink $_: $!";
+sub check_for_bonus_files {
+ my $dir = shift;
+ my %expect = map {$_, 1} @_;
+
+ my $fail;
+ opendir DIR, $dir or die "opendir '$dir': $!";
+ while (defined (my $entry = readdir DIR)) {
+ next if $expect{$entry};
+ print "# Extra file '$entry'\n";
+ $fail = 1;
}
-}
-my $fail;
-opendir DIR, "." or die "opendir '.': $!";
-while (defined (my $entry = readdir DIR)) {
- next if $entry =~ /^\.\.?$/;
- print "# Extra file '$entry'\n";
- $fail = 1;
+ closedir DIR or warn "closedir '.': $!";
+ if ($fail) {
+ print "not ok $test\n";
+ } else {
+ print "ok $test\n";
+ }
+ $test++;
}
-closedir DIR or warn "closedir '.': $!";
-if ($fail) {
- print "not ok $test\n";
+
+check_for_bonus_files ('.', @files, $output, $makefile_rename, '.', '..');
+
+rename $makefile_rename, $makefile
+ or die "Can't rename '$makefile_rename' to '$makefile': $!";
+
+unlink $output or warn "Can't unlink '$output': $!";
+
+# Need to make distclean to remove ../../lib/ExtTest.pm
+my $makedistclean = "$make distclean";
+print "# make = '$makedistclean'\n";
+@makeout = `$makedistclean`;
+if ($?) {
+ print "not ok $test # $make failed: $?\n";
+ print "# $_" foreach @makeout;
} else {
print "ok $test\n";
}
+$test++;
+
+check_for_bonus_files ('.', @files, '.', '..');
+
+unless ($keep_files) {
+ foreach (@files) {
+ unlink $_ or warn "unlink $_: $!";
+ }
+}
+
+check_for_bonus_files ('.', '.', '..');