blob: 82be0500ad78476f765c805a6656ff82b53f0f39 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#!/usr/bin/perl
# 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;
my %files;
my $test_count = 0;
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;
foreach (values %files) {
if (@$_ > 1) {
print "not ok ".++$test_count. " - ". join(", ", @$_), "\n";
} else {
print "ok ".++$test_count. " - ". join(", ", @$_), "\n";
}
}
print "1..".$test_count."\n";
|