perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pgollu...@apache.org
Subject svn commit: r419826 - in /perl/modperl/trunk/t: modperl/perl_options2.t response/TestModperl/perl_options2.pm
Date Fri, 07 Jul 2006 06:40:06 GMT
Author: pgollucci
Date: Thu Jul  6 23:40:05 2006
New Revision: 419826

URL: http://svn.apache.org/viewvc?rev=419826&view=rev
Log:
flush out the tests for PerlOptions None

only to discover that it doesn't _actually_ disable anything

Notes:
   PerlTrace d
   modperl_config.c  MP_dSCFG(s) needs to have the appropriate
     bits turned off when PerlOptions None is hit.


Added:
    perl/modperl/trunk/t/modperl/perl_options2.t
Modified:
    perl/modperl/trunk/t/response/TestModperl/perl_options2.pm

Added: perl/modperl/trunk/t/modperl/perl_options2.t
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/t/modperl/perl_options2.t?rev=419826&view=auto
==============================================================================
--- perl/modperl/trunk/t/modperl/perl_options2.t (added)
+++ perl/modperl/trunk/t/modperl/perl_options2.t Thu Jul  6 23:40:05 2006
@@ -0,0 +1,12 @@
+use strict;
+use warnings FATAL => 'all';
+
+use Apache::Test;
+use Apache::TestUtil;
+use Apache::TestRequest;
+
+my $module = 'TestModperl::perl_options2';
+my $url    = Apache::TestRequest::module2url($module);
+
+t_debug "connecting to $url";
+print GET_BODY_ASSERT $url;

Modified: perl/modperl/trunk/t/response/TestModperl/perl_options2.pm
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/t/response/TestModperl/perl_options2.pm?rev=419826&r1=419825&r2=419826&view=diff
==============================================================================
--- perl/modperl/trunk/t/response/TestModperl/perl_options2.pm (original)
+++ perl/modperl/trunk/t/response/TestModperl/perl_options2.pm Thu Jul  6 23:40:05 2006
@@ -1,21 +1,69 @@
 package TestModperl::perl_options2;
 
-# test whether PerlOptions None works in VirtualHost and Directory
+# test whether PerlOptions None works
 
 use strict;
 use warnings FATAL => 'all';
 
+use Apache2::RequestRec ();
+use Apache2::RequestIO ();
+use Apache2::RequestUtil ();
+use Apache2::ServerUtil ();
+
 use Apache::Test;
 use Apache::TestUtil;
 
+use Apache2::Const -compile => qw(OK);
+
+my @srv = qw(
+    OpenLogs
+    PostConfig
+    ChildInit
+    ChildExit
+
+    PreConnection
+    ProcessConnection
+
+    InputFilter
+    OutputFilter
+
+    PostReadRequest
+    Trans
+    MapToStorage
+    HeaderParser
+    Access
+    Authen
+    Authz
+    Type
+    Fixup
+    Log
+    Cleanup
+);
+
+sub handler {
+    my $r = shift;
+
+    plan $r, tests => scalar @srv, skip_reason('PerlOptions None is broken');
+
+    my $s = $r->server;
+
+    ok t_cmp($s->is_perl_option_enabled($_), 0,
+             "$_ is off under PerlOptions None") for @srv;
+
+    ok t_cmp($s->is_perl_option_enabled('Response'), 1,
+             "Response is off under PerlOptions None");
+           
+    return Apache2::Const::OK;
+}
+
 1;
 __DATA__
 <NoAutoConfig>
 <VirtualHost TestModperl::perl_options2>
-    PerlOptions None
-    <Directory />
-        PerlOptions None
-    </Directory>
+    <Location /TestModperl__perl_options2>
+        PerlOptions None +Response
+        SetHandler modperl
+        PerlResponseHandler TestModperl::perl_options2
+    </Location>
 </VirtualHost>
 </NoAutoConfig>
-



Mime
View raw message