2 # Finds the files that have the same name, case insensitively in the build tree
5 @INC = '..' if -f '../TestInit.pm';
8 use TestInit qw(T); # T is chdir to the top level
17 find({no_chdir => 1, wanted => sub {
18 my $name = $File::Find::name;
19 # Assumes that the path separator is exactly one character.
22 # Special exemption for Makefile, makefile
23 return if $name =~ m!\A(?:x2p/)?[Mm]akefile\z!;
25 if ($name eq '.git') {
26 # Don't scan the .git directory, as its contents are outside
27 # our control. In particular, as fetch doesn't default to
28 # --prune, # someone pushing a branch upstream with a name
29 # which case-conflicts with a previously deleted branch will
30 # cause action-at-a-distance failures, because locally
31 # .git/logs/refs/remotes will contain both.
36 push @{$files{lc $name}}, $name;
39 foreach (sort values %files) {
40 is( @$_, 1, join(", ", @$_) ) or
41 do{ note($_) foreach @$_; };