summaryrefslogtreecommitdiff
path: root/ext/I18N
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-07-08 01:34:09 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-07-08 01:34:09 +0000
commit642c2bac5c7334dca0875b93260705d7aed619bd (patch)
treef6ee7c9f70ee262b1e11c9dab6fcb2e7b983a49f /ext/I18N
parent4bbcc6e8db9fbcaee50f943cf9676737ff07d048 (diff)
downloadperl-642c2bac5c7334dca0875b93260705d7aed619bd.tar.gz
Really do the test under the C locale.
p4raw-id: //depot/perl@11210
Diffstat (limited to 'ext/I18N')
-rw-r--r--ext/I18N/Langinfo/Langinfo.t9
1 files changed, 4 insertions, 5 deletions
diff --git a/ext/I18N/Langinfo/Langinfo.t b/ext/I18N/Langinfo/Langinfo.t
index bb74f36030..0495006f40 100644
--- a/ext/I18N/Langinfo/Langinfo.t
+++ b/ext/I18N/Langinfo/Langinfo.t
@@ -3,16 +3,17 @@
BEGIN {
chdir 't' if -d 't';
require Config; import Config;
- if ($Config{'extensions'} !~ m!\bI18N/Langinfo\b!) {
+ if ($Config{'extensions'} !~ m!\bI18N/Langinfo\b! &&
+ $Config{'extensions'} !~ m!\bPOSIX\b!) {
print "1..0\n";
exit 0;
}
}
-
use I18N::Langinfo qw(langinfo ABDAY_1 DAY_1 ABMON_1 MON_1 RADIXCHAR);
+use POSIX qw(setlocale LC_ALL);
-# use the "C" locale
+setlocale(LC_ALL, "C");
print "1..5\n";
@@ -31,5 +32,3 @@ print "ok 4\n";
print "not " unless langinfo(RADIXCHAR) eq ".";
print "ok 5\n";
-
-