summaryrefslogtreecommitdiff
path: root/tests/Fetish.pm
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2001-05-13 15:22:23 +0000
committerJim Meyering <jim@meyering.net>2001-05-13 15:22:23 +0000
commitcf3a6f7638a772a1929e42d14e88a049cb10495c (patch)
tree8003ff6e1b3aaa5afc28e35c8d007da057bb24ef /tests/Fetish.pm
parentf4456619fa589d8311d40b27d6c21cdb14a87b3a (diff)
downloadcoreutils-cf3a6f7638a772a1929e42d14e88a049cb10495c.tar.xz
(run_tests): Fail if any test name is longer than 12 bytes.
Diffstat (limited to 'tests/Fetish.pm')
-rw-r--r--tests/Fetish.pm17
1 files changed, 13 insertions, 4 deletions
diff --git a/tests/Fetish.pm b/tests/Fetish.pm
index 4dffeec1f..cdd09fa18 100644
--- a/tests/Fetish.pm
+++ b/tests/Fetish.pm
@@ -12,7 +12,7 @@ use FileHandle;
use File::Compare qw(compare);
@ISA = qw(Exporter);
-($VERSION = '$Revision: 1.10 $ ') =~ tr/[0-9].//cd;
+($VERSION = '$Revision: 1.11 $ ') =~ tr/[0-9].//cd;
@EXPORT = qw (run_tests);
my $debug = $ENV{DEBUG};
@@ -189,7 +189,7 @@ sub run_tests ($$$$$)
# FIXME
# Verify that test names are distinct.
- my $found_duplicate = 0;
+ my $bad_test_name = 0;
my %seen;
my $t;
foreach $t (@$t_spec)
@@ -198,11 +198,20 @@ sub run_tests ($$$$$)
if ($seen{$test_name})
{
warn "$program_name: $test_name: duplicate test name\n";
- $found_duplicate = 1;
+ $bad_test_name = 1;
}
$seen{$test_name} = 1;
+
+ # 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.
+ if (14 < (length $test_name) + 2)
+ {
+ warn "$program_name: $test_name: test name is too long (> 12)\n";
+ $bad_test_name = 1;
+ }
}
- return 1 if $found_duplicate;
+ return 1 if $bad_test_name;
# FIXME check exit status
system ($prog, '--version') if $verbose;