httpd-apreq-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pgollu...@apache.org
Subject svn commit: r365659 - in /httpd/apreq/trunk/glue/perl/t: apreq/cookie.t response/TestApReq/cookie.pm
Date Tue, 03 Jan 2006 15:15:05 GMT
Author: pgollucci
Date: Tue Jan  3 07:15:02 2006
New Revision: 365659

URL: http://svn.apache.org/viewcvs?rev=365659&view=rev
Log:
add a test for the overloaded ""


Modified:
    httpd/apreq/trunk/glue/perl/t/apreq/cookie.t
    httpd/apreq/trunk/glue/perl/t/response/TestApReq/cookie.pm

Modified: httpd/apreq/trunk/glue/perl/t/apreq/cookie.t
URL: http://svn.apache.org/viewcvs/httpd/apreq/trunk/glue/perl/t/apreq/cookie.t?rev=365659&r1=365658&r2=365659&view=diff
==============================================================================
--- httpd/apreq/trunk/glue/perl/t/apreq/cookie.t (original)
+++ httpd/apreq/trunk/glue/perl/t/apreq/cookie.t Tue Jan  3 07:15:02 2006
@@ -6,7 +6,7 @@
 use Apache::TestUtil;
 use Apache::TestRequest qw(GET_BODY GET_HEAD);
 
-plan tests => 12;
+plan tests => 13;
 
 my $module = "TestApReq::cookie";
 my $location = Apache::TestRequest::module2url($module);
@@ -147,3 +147,13 @@
 
     ok t_cmp($str, $value, $test);
 }
+
+{
+    my $test = 'overload';
+    my $cookie = qq{\$Version="1"; one="1"};
+    my $value = qq{one="1"; Version=1};
+    my $str = GET_BODY("$location?test=$test", Cookie => $cookie);
+
+    ok t_cmp($str, $value, $test);
+}
+

Modified: httpd/apreq/trunk/glue/perl/t/response/TestApReq/cookie.pm
URL: http://svn.apache.org/viewcvs/httpd/apreq/trunk/glue/perl/t/response/TestApReq/cookie.pm?rev=365659&r1=365658&r2=365659&view=diff
==============================================================================
--- httpd/apreq/trunk/glue/perl/t/response/TestApReq/cookie.pm (original)
+++ httpd/apreq/trunk/glue/perl/t/response/TestApReq/cookie.pm Tue Jan  3 07:15:02 2006
@@ -35,6 +35,9 @@
             $r->print(join ' ', map { $_ } @names);
         }
     }
+    elsif ($test eq 'overload') {
+        $r->print($cookies{one});
+    }
     elsif ($key and $cookies{$key}) {
         if ($test eq "bake") {
             $cookies{$key}->bake($r);



Mime
View raw message