httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scte...@apache.org
Subject svn commit: r609359 - in /httpd/test/trunk/perl-framework/t: conf/extra.conf.in modules/negotiation.t
Date Sun, 06 Jan 2008 18:06:33 GMT
Author: sctemme
Date: Sun Jan  6 10:06:32 2008
New Revision: 609359

URL: http://svn.apache.org/viewvc?rev=609359&view=rev
Log:
Tread roughshod over the negotiation tests.  Apache 1.3 doesn't know of 
MultiViewsMatch, so turn that configuration bit off for 1.3, and turn off
the test that uses it.  Using need_min_apache_version() looks like the only
way I see to do this conditionally.  Patch up the logic that counts the tests
for the test plan, and that designates the final test in the sequence as a
TODO (since the TODO is the one I'm turning off).  This seems to do what I 
need, hope I'm not breaking things too badly. 


Modified:
    httpd/test/trunk/perl-framework/t/conf/extra.conf.in
    httpd/test/trunk/perl-framework/t/modules/negotiation.t

Modified: httpd/test/trunk/perl-framework/t/conf/extra.conf.in
URL: http://svn.apache.org/viewvc/httpd/test/trunk/perl-framework/t/conf/extra.conf.in?rev=609359&r1=609358&r2=609359&view=diff
==============================================================================
--- httpd/test/trunk/perl-framework/t/conf/extra.conf.in (original)
+++ httpd/test/trunk/perl-framework/t/conf/extra.conf.in Sun Jan  6 10:06:32 2008
@@ -151,13 +151,15 @@
         LanguagePriority fu fr en de
     </Directory>
 
-   <IfModule @CGI_MODULE@>
-        <Directory @SERVERROOT@/htdocs/modules/negotiation/query>
-          Options +MultiViews +ExecCGI
-          MultiviewsMatch any
-          AddHandler cgi-script .pl
-       </Directory>
-   </IfModule>
+   <IfDefine APACHE2>
+       <IfModule @CGI_MODULE@>
+            <Directory @SERVERROOT@/htdocs/modules/negotiation/query>
+              Options +MultiViews +ExecCGI
+              MultiviewsMatch any
+              AddHandler cgi-script .pl
+           </Directory>
+       </IfModule>
+   </IfDefine>
 
 </IfModule>
 

Modified: httpd/test/trunk/perl-framework/t/modules/negotiation.t
URL: http://svn.apache.org/viewvc/httpd/test/trunk/perl-framework/t/modules/negotiation.t?rev=609359&r1=609358&r2=609359&view=diff
==============================================================================
--- httpd/test/trunk/perl-framework/t/modules/negotiation.t (original)
+++ httpd/test/trunk/perl-framework/t/modules/negotiation.t Sun Jan  6 10:06:32 2008
@@ -41,9 +41,11 @@
 my ($en, $fr, $de, $fu, $bu) = qw(en fr de fu bu);
 my @language = ($en, $fr, $de, $fu);
 my $tests = (@language * 3) + (@language * @language * 5) + 7;
+$tests-- unless need_min_apache_version('2.0');
+my $todo = need_min_apache_version('2.0') ? $tests : 0;
 
 plan tests => $tests,
-    todo => [$tests],
+    todo => [$todo],
     have_module 'negotiation' && have_cgi && have_module 'mime';
 
 my $actual;
@@ -163,10 +165,12 @@
 ok t_cmp($actual, "index.html.$fr.gz",
          "bu has the highest quality but is non-existant, so fr is next best");
 
-# PR 43550 -- TODO
-$actual = GET_BODY "/modules/negotiation/query/test?foo";
-print "# GET /modules/negotiation/query/test?foo\n";
-my_chomp();
-ok t_cmp($actual, "QUERY_STRING --> foo",
-         "The type map gives the script the highest quality;"
-         . "\nthe request included a query string");
+if (need_min_apache_version('2.0')) {
+    # PR 43550 -- TODO
+    $actual = GET_BODY "/modules/negotiation/query/test?foo";
+    print "# GET /modules/negotiation/query/test?foo\n";
+    my_chomp();
+    ok t_cmp($actual, "QUERY_STRING --> foo",
+             "The type map gives the script the highest quality;"
+             . "\nthe request included a query string");
+}



Mime
View raw message