This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Run t/porting/diag.t from the top-level directory.
authorNicholas Clark <nick@ccl4.org>
Sat, 19 Dec 2009 16:19:43 +0000 (16:19 +0000)
committerCraig A. Berry <craigberry@mac.com>
Sat, 19 Dec 2009 16:54:11 +0000 (10:54 -0600)
The home-grown glob on VMS does not properly handle relative paths
containing C<../> so this test has been failing for reasons having
nothng to do with what's being tested.  For now, just avoid the
problem by running from one level up.

Message-id: <20091219161943.GQ2582@plum.flirble.org>

t/porting/diag.t

index 14c2f84..0241a12 100644 (file)
@@ -10,8 +10,10 @@ $|=1;
 
 my $make_exceptions_list = ($ARGV[0]||'') eq '--make-exceptions-list';
 
-open my $diagfh, "<", "../pod/perldiag.pod"
-  or die "Can't open ../pod/perldiag.pod: $!";
+chdir '..' or die "Can't chdir ..: $!";
+
+open my $diagfh, "<", "pod/perldiag.pod"
+  or die "Can't open pod/perldiag.pod: $!";
 
 my %entries;
 while (<DATA>) {
@@ -32,12 +34,12 @@ while (<$diagfh>) {
   }
 }
 
-my @todo = ('..');
+my @todo = <*>;
 while (@todo) {
   my $todo = shift @todo;
-  next if $todo ~~ ['../t', '../lib', '../ext', '../dist', '../cpan'];
+  next if $todo ~~ ['t', 'lib', 'ext', 'dist', 'cpan'];
   # opmini.c is just a copy of op.c, so there's no need to check again.
-  next if $todo eq '../opmini.c';
+  next if $todo eq 'opmini.c';
   if (-d $todo) {
     push @todo, glob "$todo/*";
   } elsif ($todo =~ m/\.[ch]$/) {