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/TestAPR base64.pm
Date Fri, 21 May 2004 23:52:07 GMT
stas        2004/05/21 16:52:07

  Modified:    t/response/TestAPR base64.pm
  Log:
  complete APR::Base64 API test
  
  Revision  Changes    Path
  1.3       +9 -4      modperl-2.0/t/response/TestAPR/base64.pm
  
  Index: base64.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/response/TestAPR/base64.pm,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -u -r1.2 -r1.3
  --- base64.pm	11 Apr 2002 11:08:44 -0000	1.2
  +++ base64.pm	21 May 2004 23:52:07 -0000	1.3
  @@ -4,6 +4,7 @@
   use warnings FATAL => 'all';
   
   use Apache::Test;
  +use Apache::TestUtil;
   
   use APR::Base64 ();
   
  @@ -12,15 +13,19 @@
   sub handler {
       my $r = shift;
   
  -    plan $r, tests => 2;
  +    plan $r, tests => 3;
   
  -    my $encoded = APR::Base64::encode("$r");
  +    my $str = "$r";
  +    my $encoded = APR::Base64::encode($str);
   
  +    t_debug("encoded string: $encoded");
       ok $encoded;
   
  -    my $decoded = APR::Base64::decode($encoded);
  +    ok t_cmp(length $encoded,
  +             APR::Base64::encode_len(length $str),
  +             "encoded length");
   
  -    ok $decoded eq "$r";
  +    ok t_cmp($str, APR::Base64::decode($encoded), "decode");
   
       Apache::OK;
   }
  
  
  

Mime
View raw message