From 2e2fe82afecca5a49e608cbe4e4f30d2ed1f7d34 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 1 Feb 1997 16:44:15 +0000 Subject: (spec_to_list): Warn about all filenames that exceed max-length before dying. --- tests/cut/mk-script.pl | 11 +++++++++-- tests/head/mk-script.pl | 11 +++++++++-- tests/join/mk-script.pl | 11 +++++++++-- 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, -- cgit v1.2.3-70-g09d2