From 642c2bac5c7334dca0875b93260705d7aed619bd Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Sun, 8 Jul 2001 01:34:09 +0000 Subject: [PATCH] Really do the test under the C locale. p4raw-id: //depot/perl@11210 --- ext/I18N/Langinfo/Langinfo.t | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ext/I18N/Langinfo/Langinfo.t b/ext/I18N/Langinfo/Langinfo.t index bb74f36..0495006 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"; - - -- 2.7.4