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/t/net/perl util.pl
Date Thu, 20 Feb 2003 06:48:05 GMT
stas        2003/02/19 22:48:05

  Modified:    t/net/perl util.pl
  Log:
  add tests for Apache::unescape_url
  
  Revision  Changes    Path
  1.16      +20 -1     modperl/t/net/perl/util.pl
  
  Index: util.pl
  ===================================================================
  RCS file: /home/cvs/modperl/t/net/perl/util.pl,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- util.pl	19 Jun 2002 16:31:52 -0000	1.15
  +++ util.pl	20 Feb 2003 06:48:04 -0000	1.16
  @@ -3,7 +3,7 @@
   use Apache::test;
   $|++;
   my $i = 0;
  -my $tests = 7;
  +my $tests = 9;
   
   my $r = shift;
   $r->send_http_header('text/plain');
  @@ -100,6 +100,25 @@
       Perl => sub { my $esc = URI::Escape::uri_escape($uri) },
   });  
   =cut
  +
  +    {
  +        my $str = "aa%20dd%2epl";
  +        my $expected = "aa dd.pl";
  +        my $received = Apache::unescape_url($str);
  +        test ++$i, $received eq $expected;
  +        print "expected: $expected\n";
  +        print "received: $received\n";
  +    }
  +
  +    {
  +        my $str = undef;
  +        my $expected = "";
  +        no warnings;
  +        my $received = Apache::unescape_url($str);
  +        test ++$i, $received eq $expected;
  +        print "expected: $expected\n";
  +        print "received: $received\n";
  +    }
   
   $C = Apache::Util::ht_time();
   $Perl = HTTP::Date::time2str();
  
  
  

Mime
View raw message