This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
t/loc_tools.pl: Fix some bugs in locales_enabled()
This code assumed that all locale categories were represented by
non-negative whole numbers. However, it turns out that this assumption
is wrong, as on AIX, LC_ALL is -1. This commit changes our assumption to
take into account that reality; it now assumes that all categories are
larger than a much more negative number, and now the new assumption is
tested for, and if wrong, the code dies instead of silently doing the
wrong thing.
There was also a bug where if a locale category wasn't defined on the
machine, but the corresponding #ifdef for using that category was still
set, the category was improperly assumed to exist