script to find tests with the same leading number
Dave Rolsky [Thu, 28 Oct 2010 21:57:14 +0000 (16:57 -0500)]
author/find-dupe-test-numbers [new file with mode: 0755]

diff --git a/author/find-dupe-test-numbers b/author/find-dupe-test-numbers
new file mode 100755 (executable)
index 0000000..ce975a0
--- /dev/null
@@ -0,0 +1,23 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use File::Basename qw( basename );
+
+for my $subdir ( glob 't/*' ) {
+    my %files;
+
+    for my $file ( map { basename($_) } glob "$subdir/*.t" ) {
+        my ($number) = $file =~ /^(\d+)/;
+        next unless defined $number;
+
+        push @{ $files{$number} }, $file;
+    }
+
+    for my $number ( grep { @{ $files{$_} } > 1 } keys %files ) {
+        print $subdir, "\n";
+        print '  - ', $_, "\n" for @{ $files{$number} };
+        print "\n";
+    }
+}