This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Remove BEGIN{}, use '..', part deux
[perl5.git] / t / porting / checkcase.t
CommitLineData
772ab650
JM
1#!/usr/bin/perl
2# Finds the files that have the same name, case insensitively,
3# in the current directory and its subdirectories
4
5use warnings;
6use strict;
7use File::Find;
8
9my %files;
bf61c852
JV
10my $test_count = 0;
11
772ab650
JM
12find(sub {
13 my $name = $File::Find::name;
14 # Assumes that the path separator is exactly one character.
15 $name =~ s/^\.\..//;
16 push @{$files{lc $name}}, $name;
85ee66eb 17 }, '..');
772ab650
JM
18
19my $failed;
20
21foreach (values %files) {
22 if (@$_ > 1) {
bf61c852
JV
23 print "not ok ".++$test_count. " - ". join(", ", @$_), "\n";
24 } else {
25 print "ok ".++$test_count. " - ". join(", ", @$_), "\n";
26 }
772ab650
JM
27}
28
bf61c852 29print "1..".$test_count."\n";