perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: mp2.0 - make test failed compat/apache_util.t
Date Tue, 27 May 2003 05:31:06 GMT
> I think it failed
> because my locale is set to japanese environment (ja_JP.eucJP). When the
> LANG=ja_jp.eucJP, then t/TEST -v will be like:
> 
> [root@shibuya-dv1 mod_perl-1.99_09]# t/TEST -v compat/apache_util.t
[...]
> # testing : Apache::Util::ht_time
> # expected: '火, 27  5月 2003 04:44:03 GMT'
> # received: '火, 27  5月 2003 04:44:03 GMT'
> ok 12
> # testing : Apache::Util::parsedate
> # expected: 1054010643
> # received: '0'
> not ok 13
[...]
> And then if I set it to English (en_US) it will be like:
> [root@shibuya-dv1 mod_perl-1.99_09]# LANG=en_US t/TEST -v
> compat/apache_util.t

> All tests successful.
> Files=1, Tests=15,  1 wallclock secs ( 0.62 cusr +  0.05 csys =  0.67 CPU)
> *** server localhost.localdomain:8529 shutdown
> 
> I will try to compile again with LANG=en_US and post the result again
> here.

You don't need to recompile with LANG=en_US, it's a run-time setting.

However I'll need your help to resolve this for all those who have a different
LC setting. BTW, according to strftime it's LC_TIME env var that matters. or
is LANG affecting all other LC_* env vars?

Does the test pass as-is if you apply this patch?

Index: t/conf/modperl_extra.pl
===================================================================
RCS file: /home/cvs/modperl-2.0/t/conf/modperl_extra.pl,v
retrieving revision 1.29
diff -u -r1.29 modperl_extra.pl
--- t/conf/modperl_extra.pl     14 May 2003 02:26:53 -0000      1.29
+++ t/conf/modperl_extra.pl     27 May 2003 05:28:24 -0000
@@ -1,6 +1,8 @@
 use Socket (); #test DynaLoader vs. XSLoader workaround for 5.6.x
 use IO::File ();

+$ENV{LANG} = 'en_US';
+
 use Apache2 ();

 use ModPerl::Util (); #for CORE::GLOBAL::exit


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message