perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: modperl-2.0/t/response/TestCompat apache_util.pm
Date Wed, 28 May 2003 02:04:52 GMT
stas        2003/05/27 19:04:52

  Modified:    t/response/TestCompat apache_util.pm
  Log:
  skip http date parse sub-test unless $locale =~ /^en_/
  
  Revision  Changes    Path
  1.3       +11 -4     modperl-2.0/t/response/TestCompat/apache_util.pm
  
  Index: apache_util.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/response/TestCompat/apache_util.pm,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- apache_util.pm	13 Mar 2003 02:12:49 -0000	1.2
  +++ apache_util.pm	28 May 2003 02:04:51 -0000	1.3
  @@ -28,10 +28,15 @@
   
   my $crypt_ok = $crypt_supported{lc $^O} ? 1 : 0;
   
  +my $locale = $ENV{LANG} || $ENV{LC_TIME} || '';
  +# XXX: will any en_XXX work with http_parse?
  +# XXX: should we set $ENV{LANG} to en_US instead of skipping?
  +my $parse_time_ok = $locale =~ /^en_/ ? 1 : 0;
  +
   sub handler {
       my $r = shift;
   
  -    plan $r, tests => 13 + $crypt_ok*2;
  +    plan $r, tests => 12 + $parse_time_ok*1 + $crypt_ok*2;
   
       $r->send_http_header('text/plain');
   
  @@ -71,13 +76,15 @@
   
       # ht_time(), parsedate()
       my $time = time;
  +    
       my $fmtdate = Apache::Util::ht_time($time);
   
       ok t_cmp($fmtdate, $fmtdate, "Apache::Util::ht_time");
   
  -    my $ptime = Apache::Util::parsedate($fmtdate);
  -
  -    ok t_cmp($time, $ptime, "Apache::Util::parsedate");
  +    if ($parse_time_ok) {
  +        my $ptime = Apache::Util::parsedate($fmtdate);
  +        ok t_cmp($time, $ptime, "Apache::Util::parsedate");
  +    }
   
       if ($crypt_ok) {
           # not all platforms support C-level crypt
  
  
  

Mime
View raw message