diff options
author | Karl Williamson <public@khwilliamson.com> | 2012-01-15 11:16:57 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2012-01-21 10:02:52 -0700 |
commit | fdf053ee47ea9986e50057289304565de43efda8 (patch) | |
tree | 531b3fd4cdaa1f7513752d439bdd05d624916ffb /lib | |
parent | 36a42ae7f28e83e71a55c9556ce17f890f2ec0b1 (diff) | |
download | perl-fdf053ee47ea9986e50057289304565de43efda8.tar.gz |
locale.t: Move test plan to end
The current code goes through a lot of machinations to know
1..n
at the beginning. Nowadays, one can simply calculate this as we go
along and print it out at the end. If the test fails in the middle, the
lack of a plan will be marked as a failure.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/locale.t | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/locale.t b/lib/locale.t index 690a17387b..89a87ab923 100644 --- a/lib/locale.t +++ b/lib/locale.t @@ -57,10 +57,6 @@ $have_setlocale = 0 if ((($^O eq 'MSWin32' && !$winxp) || $^O eq 'NetWare') && $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"; - sub LC_ALL (); $a = 'abc %'; @@ -259,7 +255,10 @@ sub last_without_setlocale { 98 } # Let us do some *real* locale work now, # unless setlocale() is missing (i.e. minitest). -exit unless $have_setlocale; +unless ($have_setlocale) { + print "1..$test_num\n"; + exit; +} # Find locales. @@ -1007,6 +1006,6 @@ setlocale(LC_ALL, "C"); } -sub last { 165 } +print "1..$test_num\n"; # eof |