From 98daf176ddc377ada1c979928072a674f5c20112 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Tue, 13 Dec 2011 21:24:24 -0700 Subject: [PATCH] locale.t: Prepare for adding more tests This custom TAP output .t has hard-coded test numbers. Rather than disturb those, I plan to add tests that come after all the current ones, and this paves the way for that. --- lib/locale.t | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/locale.t b/lib/locale.t index 79fce19..1551bff 100644 --- a/lib/locale.t +++ b/lib/locale.t @@ -56,6 +56,7 @@ $have_setlocale = 0 if ((($^O eq 'MSWin32' && !$winxp) || $^O eq 'NetWare') && # UWIN seems to loop after test 98, just skip for now $have_setlocale = 0 if ($^O =~ /^uwin/); +my $last_locales = $have_setlocale ? &last_locales : &last_without_setlocale; my $last = $have_setlocale ? &last : &last_without_setlocale; print "1..$last\n"; @@ -834,7 +835,7 @@ foreach $Locale (@Locale) { # Recount the errors. -foreach (&last_without_setlocale()+1..$last) { +foreach (&last_without_setlocale()+1..$last_locales) { if ($Problem{$_} || !defined $Okay{$_} || !@{$Okay{$_}}) { if ($_ == 102) { print "# The failure of test 102 is not necessarily fatal.\n"; @@ -850,7 +851,7 @@ foreach (&last_without_setlocale()+1..$last) { my $didwarn = 0; -foreach (99..$last) { +foreach (99..$last_locales) { if ($Problem{$_}) { my @f = sort keys %{ $Problem{$_} }; my $f = join(" ", @f); @@ -882,7 +883,7 @@ if ($didwarn) { foreach my $l (@Locale) { my $p = 0; - foreach my $t (102..$last) { + foreach my $t (102..$last_locales) { $p++ if $Problem{$t}{$l}; } push @s, $l if $p == 0; @@ -925,6 +926,8 @@ if ($didwarn) { } } +sub last_locales { 117 } + sub last { 117 } # eof -- 2.7.4