From: Jarkko Hietaniemi Date: Wed, 10 Oct 2001 11:40:29 +0000 (+0000) Subject: VMS-specific fixes to the ExtUtils::Manifest tests. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=349e1be188d528e573d1d7b9ae200dd93769fda1;p=p5sagit%2Fp5-mst-13.2.git VMS-specific fixes to the ExtUtils::Manifest tests. o VMS is case-insensitive, RTL downcases filenames read by perl... so need to re-upcase filenames like MANIFEST and MANIFEST.SKIP o Need to convert VMS-style to Unix-style filenames when comparing names in MANIFEST to names in filesystem. o Need to remove mantest/MANIFEST before rmdir'ing mantest, since VMS won't let you (easily) delete non-empty directories. From Charles Lane. p4raw-id: //depot/perl@12389 --- diff --git a/lib/ExtUtils/Manifest.pm b/lib/ExtUtils/Manifest.pm index 2d4d7e3..e75b077 100644 --- a/lib/ExtUtils/Manifest.pm +++ b/lib/ExtUtils/Manifest.pm @@ -69,6 +69,7 @@ sub manifind { $name =~ s/^:([^:]+)$/$1/ if $Is_MacOS; warn "Debug: diskfile $name\n" if $Debug; $name =~ s#(.*)\.$#\L$1# if $Is_VMS; + $name = uc($name) if /^MANIFEST/i && $Is_VMS; $found->{$name} = "";}, $Is_MacOS ? ":" : "."); $found; } @@ -158,7 +159,8 @@ sub maniread { if (@pieces > 2) { $base = shift(@pieces) . '.' . join('_',@pieces); } my $okfile = "$dir$base"; warn "Debug: Illegal name $file changed to $okfile\n" if $Debug; - $file = "\L$okfile"; + $file = $okfile; + $file = lc($file) unless $file =~ /^MANIFEST/i; } $read->{$file} = $comment; diff --git a/lib/ExtUtils/Manifest.t b/lib/ExtUtils/Manifest.t index f62665e..2492e2a 100644 --- a/lib/ExtUtils/Manifest.t +++ b/lib/ExtUtils/Manifest.t @@ -106,6 +106,7 @@ is( join(' ', filecheck() ), 'bar', 'listing skipped with filecheck()' ); ok( mkdir( 'moretest', 0777 ), 'created moretest directory' ); my $quux = File::Spec->catfile( 'moretest', 'quux' ); $quux =~ s#\\#/#g; +$quux = VMS::Filespec::unixify($quux) if $^O eq 'VMS'; add_file( $quux, 'quux' ); ok( exists( ExtUtils::Manifest::manifind()->{$quux} ), "manifind found $quux" ); @@ -150,5 +151,7 @@ END { # now get rid of the parent directory ok( chdir( $cwd ), 'return to parent directory' ); + unlink('mantest/MANIFEST'); remove_dir( 'mantest' ); } +