httpd-apreq-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject cvs commit: httpd-apreq-2/glue/perl/t/response/TestApReq cookie.pm
Date Thu, 13 Nov 2003 04:05:21 GMT
joes        2003/11/12 20:05:21

  Modified:    glue/perl/t/apreq cookie.t
               glue/perl/t/response/TestApReq cookie.pm
  Log:
  Add another test that exercises Apache::Cookie::set_attr
  
  Revision  Changes    Path
  1.7       +8 -1      httpd-apreq-2/glue/perl/t/apreq/cookie.t
  
  Index: cookie.t
  ===================================================================
  RCS file: /home/cvs/httpd-apreq-2/glue/perl/t/apreq/cookie.t,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- cookie.t	12 Nov 2003 19:29:36 -0000	1.6
  +++ cookie.t	13 Nov 2003 04:05:20 -0000	1.7
  @@ -7,7 +7,7 @@
   use Apache::TestRequest qw(GET_BODY GET_HEAD);
   use HTTP::Cookies;
   
  -plan tests => 6;
  +plan tests => 7;
   
   my $location = "/TestApReq__cookie";
   
  @@ -16,6 +16,13 @@
       my $value = 'bar';
       ok t_cmp($value,
                GET_BODY("$location?test=new"),
  +             $test);
  +}
  +{
  +    my $test  = 'new';
  +    my $value = 'bar';
  +    ok t_cmp($value,
  +             GET_BODY("$location?test=new;expires=%2B3M"),
                $test);
   }
   {
  
  
  
  1.8       +4 -1      httpd-apreq-2/glue/perl/t/response/TestApReq/cookie.pm
  
  Index: cookie.pm
  ===================================================================
  RCS file: /home/cvs/httpd-apreq-2/glue/perl/t/response/TestApReq/cookie.pm,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- cookie.pm	12 Nov 2003 19:29:36 -0000	1.7
  +++ cookie.pm	13 Nov 2003 04:05:20 -0000	1.8
  @@ -30,8 +30,11 @@
           $r->print($cookies{$key}->value);
       }
       else {
  +        my @expires;
  +        @expires = ("expires", $req->param('expires')) if $req->param('expires');
  +
           my $cookie = Apache::Cookie->new($r, name => "foo",
  -                                            value => "bar");
  +                                            value => "bar", @expires);
           if ($test eq "bake") {
               $cookie->bake;
           }
  
  
  

Mime
View raw message