summaryrefslogtreecommitdiff
path: root/tests/mk-script
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2005-01-13 22:16:29 +0000
committerJim Meyering <jim@meyering.net>2005-01-13 22:16:29 +0000
commitd5a5cf8f9d927af37f002e491f450692d9ccbb77 (patch)
tree0c4b5ff8d34a9794b03a548850030a6b4a6ffd46 /tests/mk-script
parentc7efc489f3505946c0c7ebd9d5dd2a5d4b9f4830 (diff)
downloadcoreutils-d5a5cf8f9d927af37f002e491f450692d9ccbb77.tar.xz
(validate): Add code (if-0'd out) to detect
names of temporary files that would clash on 8.3 file systems.
Diffstat (limited to 'tests/mk-script')
-rwxr-xr-xtests/mk-script24
1 files changed, 21 insertions, 3 deletions
diff --git a/tests/mk-script b/tests/mk-script
index aef808a1c..3cc591900 100755
--- a/tests/mk-script
+++ b/tests/mk-script
@@ -10,7 +10,7 @@ require 5.002;
use strict;
use POSIX qw (assert);
-(my $program_name = $0) =~ s|.*/||;
+(my $ME = $0) =~ s|.*/||;
BEGIN { push @INC, '.' if '.' ne '.'; }
use Test;
@@ -20,6 +20,9 @@ my $srcdir = shift;
sub validate
{
my %seen;
+ my %seen_8dot3;
+
+ my $bad_test_name;
my $test_vector;
foreach $test_vector (Test::test_vector ())
{
@@ -34,7 +37,22 @@ sub validate
die "$0: duplicate test name \`$test_name'\n"
if (defined $seen{$test_name});
$seen{$test_name} = 1;
+
+ if (0)
+ {
+ my $t8 = lc substr $test_name, 0, 8;
+ if ($seen_8dot3{$t8})
+ {
+ warn "$ME: 8.3 test name conflict: "
+ . "$test_name, $seen_8dot3{$t8}\n";
+ $bad_test_name = 1;
+ }
+ $seen_8dot3{$t8} = $test_name;
+ }
}
+
+ $bad_test_name
+ and exit 1;
}
# Given a spec for the input file(s) or expected output file of a single
@@ -216,7 +234,7 @@ sub wrap
print <<EOF1;
#! /bin/sh
-# This script was generated automatically by $program_name.
+# This script was generated automatically by $ME.
case \$# in
0\) xx='$xx';;
*\) xx="\$1";;
@@ -283,7 +301,7 @@ EOF1
my $env = $Test::env{$test_name} || $Test::env_default || [''];
@$env == 1
- or die "$program_name: unexpected environment: @$env\n";
+ or die "$ME: unexpected environment: @$env\n";
$env = $env->[0];
my $env_prefix = ($env ? "$env " : '');