]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(run_tests): Add code (if-0'd out) to detect
authorJim Meyering <jim@meyering.net>
Thu, 13 Jan 2005 22:13:53 +0000 (22:13 +0000)
committerJim Meyering <jim@meyering.net>
Thu, 13 Jan 2005 22:13:53 +0000 (22:13 +0000)
names of temporary files that would clash on 8.3 file systems.

tests/Fetish.pm

index 3938583360770f48133d885701ffb7d10aefbe31..8e4a0260dc48f65faa6323711fe4337ec981abad 100644 (file)
@@ -12,7 +12,7 @@ use FileHandle;
 use File::Compare qw(compare);
 
 @ISA = qw(Exporter);
-($VERSION = '$Revision: 1.16 $ ') =~ tr/[0-9].//cd;
+($VERSION = '$Revision: 1.17 $ ') =~ tr/[0-9].//cd;
 @EXPORT = qw (run_tests);
 
 my $debug = $ENV{DEBUG};
@@ -204,6 +204,7 @@ sub run_tests ($$$$$)
   # Verify that test names are distinct.
   my $bad_test_name = 0;
   my %seen;
+  my %seen_8dot3;
   my $t;
   foreach $t (@$t_spec)
     {
@@ -215,6 +216,18 @@ sub run_tests ($$$$$)
        }
       $seen{$test_name} = 1;
 
+      if (0)
+       {
+         my $t8 = lc substr $test_name, 0, 8;
+         if ($seen_8dot3{$t8})
+           {
+             warn "$program_name: 8.3 test name conflict: "
+               . "$test_name, $seen_8dot3{$t8}\n";
+             $bad_test_name = 1;
+           }
+         $seen_8dot3{$t8} = $test_name;
+       }
+
       # The test name may be no longer than 12 bytes,
       # so that we can add a two-byte suffix without exceeding
       # the maximum of 14 imposed on some old file systems.