This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
t/TEST: warn about unknown files deparse-skips.txt
authorDavid Mitchell <davem@iabyn.com>
Fri, 24 Feb 2017 20:15:48 +0000 (20:15 +0000)
committerDavid Mitchell <davem@iabyn.com>
Mon, 5 Jun 2017 11:52:18 +0000 (12:52 +0100)
In ./TEST -deparse, when reading Porting/deparse-skips.txt, emit a warning
for each excluded file which no longer exists.

Also, move the scope of $in to just the sub that uses it.

t/TEST

diff --git a/t/TEST b/t/TEST
index 0c16dd2..8509b56 100755 (executable)
--- a/t/TEST
+++ b/t/TEST
@@ -962,7 +962,6 @@ sub _cleanup_valgrind {
 }
 
 # Generate regexps of known bad filenames / skips from Porting/deparse-skips.txt
-my $in;
 
 sub _process_deparse_config {
     my @deparse_failures;
@@ -976,6 +975,7 @@ sub _process_deparse_config {
         return;
     }
 
+    my $in;
     while(<$skips>) {
         if (/__DEPARSE_FAILURES__/) {
             $in = \@deparse_failures; next;
@@ -991,6 +991,7 @@ sub _process_deparse_config {
         next unless $_;
 
         push @$in, $_;
+       warn "WARNING: $f:$.: excluded file doesn't exist: $_\n" unless -f $_;
     }
 
     for my $f (@deparse_failures, @deparse_skips) {