VMS-specific fixes to the ExtUtils::Manifest tests.
authorJarkko Hietaniemi <jhi@iki.fi>
Wed, 10 Oct 2001 11:40:29 +0000 (11:40 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Wed, 10 Oct 2001 11:40:29 +0000 (11:40 +0000)
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

lib/ExtUtils/Manifest.pm
lib/ExtUtils/Manifest.t

index 2d4d7e3..e75b077 100644 (file)
@@ -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;
index f62665e..2492e2a 100644 (file)
@@ -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' );
 }
+