This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Eliminate tryAMAGICunW() by refactoring tryAMAGICun{DEREF,TARGET}
[perl5.git] / t / porting / checkcase.t
index 82be050..6ae1cf8 100644 (file)
@@ -2,13 +2,6 @@
 # Finds the files that have the same name, case insensitively,
 # in the current directory and its subdirectories
 
-BEGIN {
-    chdir 't' if -d 't';
-    @INC = '../lib';
-}
-
-
-
 use warnings;
 use strict;
 use File::Find;
@@ -20,14 +13,17 @@ find(sub {
           my $name = $File::Find::name;
           # Assumes that the path separator is exactly one character.
           $name =~ s/^\.\..//;
-          push @{$files{lc $name}}, $name;
-        }, '.');
 
-my $failed;
+          # Special exemption for Makefile, makefile
+          return if $name =~ m!\A(?:x2p/)?[Mm]akefile\z!;
+
+          push @{$files{lc $name}}, $name;
+        }, '..');
 
-foreach (values %files) {
+foreach (sort values %files) {
     if (@$_ > 1) {
                print "not ok ".++$test_count. " - ". join(", ", @$_), "\n";
+               print STDERR "# $_\n" foreach @$_;
     } else {
                print "ok ".++$test_count. " - ". join(", ", @$_), "\n";
        }