diff options
author | Jim Meyering <jim@meyering.net> | 1997-02-01 16:44:15 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1997-02-01 16:44:15 +0000 |
commit | 2e2fe82afecca5a49e608cbe4e4f30d2ed1f7d34 (patch) | |
tree | 8606c8637df463c8850f47814e3f8ac60fa7e4db | |
parent | 67c51751386d2add78e5477925e3314966f22ad5 (diff) | |
download | coreutils-2e2fe82afecca5a49e608cbe4e4f30d2ed1f7d34.tar.xz |
(spec_to_list): Warn about all filenames that exceed max-length before dying.
-rw-r--r-- | tests/cut/mk-script.pl | 11 | ||||
-rw-r--r-- | tests/head/mk-script.pl | 11 | ||||
-rw-r--r-- | tests/join/mk-script.pl | 11 | ||||
-rw-r--r-- | tests/ls/mk-script.pl | 11 |
4 files changed, 36 insertions, 8 deletions
diff --git a/tests/cut/mk-script.pl b/tests/cut/mk-script.pl index 48b4b1db6..c85aaaa59 100644 --- a/tests/cut/mk-script.pl +++ b/tests/cut/mk-script.pl @@ -120,11 +120,18 @@ sub spec_to_list ($$$) ++$i; } + my $n_fail = 0; foreach $i (@explicit_file, @maint_gen_file) { - die "$0: $i: generated test file name would be longer than 14 characters" - if (length ($i) > 14); + my $max_len = 14; + if (length ($i) > $max_len) + { + warn "$0: $i: generated test file name would be longer than" + . " $max_len characters\n"; + ++$n_fail; + } } + exit (1) if $n_fail; my %h = ( EXPLICIT => \@explicit_file, diff --git a/tests/head/mk-script.pl b/tests/head/mk-script.pl index 48b4b1db6..c85aaaa59 100644 --- a/tests/head/mk-script.pl +++ b/tests/head/mk-script.pl @@ -120,11 +120,18 @@ sub spec_to_list ($$$) ++$i; } + my $n_fail = 0; foreach $i (@explicit_file, @maint_gen_file) { - die "$0: $i: generated test file name would be longer than 14 characters" - if (length ($i) > 14); + my $max_len = 14; + if (length ($i) > $max_len) + { + warn "$0: $i: generated test file name would be longer than" + . " $max_len characters\n"; + ++$n_fail; + } } + exit (1) if $n_fail; my %h = ( EXPLICIT => \@explicit_file, diff --git a/tests/join/mk-script.pl b/tests/join/mk-script.pl index 48b4b1db6..c85aaaa59 100644 --- a/tests/join/mk-script.pl +++ b/tests/join/mk-script.pl @@ -120,11 +120,18 @@ sub spec_to_list ($$$) ++$i; } + my $n_fail = 0; foreach $i (@explicit_file, @maint_gen_file) { - die "$0: $i: generated test file name would be longer than 14 characters" - if (length ($i) > 14); + my $max_len = 14; + if (length ($i) > $max_len) + { + warn "$0: $i: generated test file name would be longer than" + . " $max_len characters\n"; + ++$n_fail; + } } + exit (1) if $n_fail; my %h = ( EXPLICIT => \@explicit_file, diff --git a/tests/ls/mk-script.pl b/tests/ls/mk-script.pl index 48b4b1db6..c85aaaa59 100644 --- a/tests/ls/mk-script.pl +++ b/tests/ls/mk-script.pl @@ -120,11 +120,18 @@ sub spec_to_list ($$$) ++$i; } + my $n_fail = 0; foreach $i (@explicit_file, @maint_gen_file) { - die "$0: $i: generated test file name would be longer than 14 characters" - if (length ($i) > 14); + my $max_len = 14; + if (length ($i) > $max_len) + { + warn "$0: $i: generated test file name would be longer than" + . " $max_len characters\n"; + ++$n_fail; + } } + exit (1) if $n_fail; my %h = ( EXPLICIT => \@explicit_file, |