You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by sf...@apache.org on 2012/02/24 21:41:06 UTC
svn commit: r1293404 - in /httpd/test/framework/trunk/t: apache/ conf/
htdocs/modules/filter/ htdocs/modules/filter/bytype/
htdocs/modules/filter/pr49328/ modules/
Author: sf
Date: Fri Feb 24 20:41:05 2012
New Revision: 1293404
URL: http://svn.apache.org/viewvc?rev=1293404&view=rev
Log:
Add tests for AddOutputFilterByType
Also move files for existing tests for PR 49328 into subdir of
htdocs/modules/filter
Added:
httpd/test/framework/trunk/t/htdocs/modules/filter/bytype/
httpd/test/framework/trunk/t/htdocs/modules/filter/bytype/test.css (with props)
httpd/test/framework/trunk/t/htdocs/modules/filter/bytype/test.html (with props)
httpd/test/framework/trunk/t/htdocs/modules/filter/bytype/test.txt (with props)
httpd/test/framework/trunk/t/htdocs/modules/filter/bytype/test.xml (with props)
httpd/test/framework/trunk/t/htdocs/modules/filter/pr49328/
httpd/test/framework/trunk/t/htdocs/modules/filter/pr49328/included.shtml
httpd/test/framework/trunk/t/htdocs/modules/filter/pr49328/pr49328.shtml
Removed:
httpd/test/framework/trunk/t/htdocs/modules/filter/included.shtml
httpd/test/framework/trunk/t/htdocs/modules/filter/pr49328.shtml
Modified:
httpd/test/framework/trunk/t/apache/pr49328.t
httpd/test/framework/trunk/t/conf/extra.conf.in
httpd/test/framework/trunk/t/modules/filter.t
Modified: httpd/test/framework/trunk/t/apache/pr49328.t
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/apache/pr49328.t?rev=1293404&r1=1293403&r2=1293404&view=diff
==============================================================================
--- httpd/test/framework/trunk/t/apache/pr49328.t (original)
+++ httpd/test/framework/trunk/t/apache/pr49328.t Fri Feb 24 20:41:05 2012
@@ -15,7 +15,7 @@ push @deflate_headers, "Accept-Encoding"
my @inflate_headers;
push @inflate_headers, "Content-Encoding" => "gzip";
-my $uri = "/modules/filter/pr49328.shtml";
+my $uri = "/modules/filter/pr49328/pr49328.shtml";
my $content = GET_BODY($uri, @deflate_headers);
Modified: httpd/test/framework/trunk/t/conf/extra.conf.in
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/conf/extra.conf.in?rev=1293404&r1=1293403&r2=1293404&view=diff
==============================================================================
--- httpd/test/framework/trunk/t/conf/extra.conf.in (original)
+++ httpd/test/framework/trunk/t/conf/extra.conf.in Fri Feb 24 20:41:05 2012
@@ -703,7 +703,7 @@ LimitRequestFields 32
</Location>
</IfModule>
- <Directory @SERVERROOT@/htdocs/modules/filter>
+ <Directory @SERVERROOT@/htdocs/modules/filter/pr49328>
Options +Includes
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
@@ -724,6 +724,14 @@ LimitRequestFields 32
FilterChain pr49328
</IfModule>
</Directory>
+ <Directory @SERVERROOT@/htdocs/modules/filter/bytype>
+ <IfModule mod_deflate.c>
+ AddOutputFilterByType DEFLATE text/xml
+ AddOutputFilterByType DEFLATE text/css
+ </IfModule>
+ AddOutputFilterByType CASEFILTER text/xml
+ AddOutputFilterByType CASEFILTER text/plain
+ </Directory>
</IfModule>
##
Added: httpd/test/framework/trunk/t/htdocs/modules/filter/bytype/test.css
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/htdocs/modules/filter/bytype/test.css?rev=1293404&view=auto
==============================================================================
--- httpd/test/framework/trunk/t/htdocs/modules/filter/bytype/test.css (added)
+++ httpd/test/framework/trunk/t/htdocs/modules/filter/bytype/test.css Fri Feb 24 20:41:05 2012
@@ -0,0 +1 @@
+helloworld
Propchange: httpd/test/framework/trunk/t/htdocs/modules/filter/bytype/test.css
------------------------------------------------------------------------------
svn:eol-style = native
Added: httpd/test/framework/trunk/t/htdocs/modules/filter/bytype/test.html
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/htdocs/modules/filter/bytype/test.html?rev=1293404&view=auto
==============================================================================
--- httpd/test/framework/trunk/t/htdocs/modules/filter/bytype/test.html (added)
+++ httpd/test/framework/trunk/t/htdocs/modules/filter/bytype/test.html Fri Feb 24 20:41:05 2012
@@ -0,0 +1 @@
+helloworld
Propchange: httpd/test/framework/trunk/t/htdocs/modules/filter/bytype/test.html
------------------------------------------------------------------------------
svn:eol-style = native
Added: httpd/test/framework/trunk/t/htdocs/modules/filter/bytype/test.txt
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/htdocs/modules/filter/bytype/test.txt?rev=1293404&view=auto
==============================================================================
--- httpd/test/framework/trunk/t/htdocs/modules/filter/bytype/test.txt (added)
+++ httpd/test/framework/trunk/t/htdocs/modules/filter/bytype/test.txt Fri Feb 24 20:41:05 2012
@@ -0,0 +1 @@
+helloworld
Propchange: httpd/test/framework/trunk/t/htdocs/modules/filter/bytype/test.txt
------------------------------------------------------------------------------
svn:eol-style = native
Added: httpd/test/framework/trunk/t/htdocs/modules/filter/bytype/test.xml
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/htdocs/modules/filter/bytype/test.xml?rev=1293404&view=auto
==============================================================================
--- httpd/test/framework/trunk/t/htdocs/modules/filter/bytype/test.xml (added)
+++ httpd/test/framework/trunk/t/htdocs/modules/filter/bytype/test.xml Fri Feb 24 20:41:05 2012
@@ -0,0 +1 @@
+helloworld
Propchange: httpd/test/framework/trunk/t/htdocs/modules/filter/bytype/test.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: httpd/test/framework/trunk/t/htdocs/modules/filter/pr49328/included.shtml
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/htdocs/modules/filter/pr49328/included.shtml?rev=1293404&view=auto
==============================================================================
--- httpd/test/framework/trunk/t/htdocs/modules/filter/pr49328/included.shtml (added)
+++ httpd/test/framework/trunk/t/htdocs/modules/filter/pr49328/included.shtml Fri Feb 24 20:41:05 2012
@@ -0,0 +1 @@
+included
\ No newline at end of file
Added: httpd/test/framework/trunk/t/htdocs/modules/filter/pr49328/pr49328.shtml
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/htdocs/modules/filter/pr49328/pr49328.shtml?rev=1293404&view=auto
==============================================================================
--- httpd/test/framework/trunk/t/htdocs/modules/filter/pr49328/pr49328.shtml (added)
+++ httpd/test/framework/trunk/t/htdocs/modules/filter/pr49328/pr49328.shtml Fri Feb 24 20:41:05 2012
@@ -0,0 +1,3 @@
+before
+<!--#include virtual="included.shtml" -->
+after
Modified: httpd/test/framework/trunk/t/modules/filter.t
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/modules/filter.t?rev=1293404&r1=1293403&r2=1293404&view=diff
==============================================================================
--- httpd/test/framework/trunk/t/modules/filter.t (original)
+++ httpd/test/framework/trunk/t/modules/filter.t Fri Feb 24 20:41:05 2012
@@ -6,10 +6,20 @@ use Apache::TestRequest;
use Apache::TestUtil qw(t_cmp t_write_file);
use File::Spec;
-plan tests => 1, need need_cgi, need_module('mod_filter'),
- need_module('mod_case_filter');
-
-my $r = GET_BODY('/modules/cgi/xother.pl');
+my @testcases = (
+ ['/modules/cgi/xother.pl' => 'HELLOWORLD'],
+ ['/modules/filter/bytype/test.txt' => 'HELLOWORLD'],
+ ['/modules/filter/bytype/test.xml' => 'HELLOWORLD'],
+ ['/modules/filter/bytype/test.css' => 'helloworld'],
+ ['/modules/filter/bytype/test.html' => 'helloworld'],
+);
-ok t_cmp($r, "HELLOWORLD");
+plan tests => scalar @testcases, need need_cgi,
+ need_module('mod_filter'),
+ need_module('mod_case_filter');
+foreach my $t (@testcases) {
+ my $r = GET_BODY($t->[0]);
+ chomp $r;
+ ok t_cmp($r, $t->[1]);
+}