Return-Path: Delivered-To: apmail-httpd-test-cvs-archive@httpd.apache.org Received: (qmail 388 invoked by uid 500); 5 Apr 2002 07:27:30 -0000 Mailing-List: contact test-cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: test-dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list test-cvs@httpd.apache.org Received: (qmail 367 invoked from network); 5 Apr 2002 07:27:30 -0000 Date: 5 Apr 2002 07:27:29 -0000 Message-ID: <20020405072729.79902.qmail@icarus.apache.org> From: jwoolley@apache.org To: httpd-test-cvs@apache.org Subject: cvs commit: httpd-test/perl-framework/t/htdocs/modules/include/bucketeer y.shtml y0.shtml y1.shtml y2.shtml y3.shtml y4.shtml X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N jwoolley 02/04/04 23:27:29 Modified: perl-framework/t/conf extra.conf.in perl-framework/t/modules include.t Added: perl-framework/t/htdocs/modules/include/bucketeer y.shtml y0.shtml y1.shtml y2.shtml y3.shtml y4.shtml Log: Added a bunch of tests that use mod_bucketeer to find edge cases in mod_include. Many thanks to Ian Holsman for providing the groundwork for this. Revision Changes Path 1.35 +12 -5 httpd-test/perl-framework/t/conf/extra.conf.in Index: extra.conf.in =================================================================== RCS file: /home/cvs/httpd-test/perl-framework/t/conf/extra.conf.in,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -u -r1.34 -r1.35 --- extra.conf.in 5 Feb 2002 09:08:41 -0000 1.34 +++ extra.conf.in 5 Apr 2002 07:27:28 -0000 1.35 @@ -142,15 +142,13 @@ + AddType text/html .shtml + - AddType text/html .shtml AddHandler server-parsed .shtml - - - SetOutputFilter INCLUDES - + AddOutputFilter INCLUDES .shtml @@ -170,6 +168,15 @@ Options Includes + + + + + SetOutputFilter BUCKETEER + + + + ## 1.17 +69 -2 httpd-test/perl-framework/t/modules/include.t Index: include.t =================================================================== RCS file: /home/cvs/httpd-test/perl-framework/t/modules/include.t,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -u -r1.16 -r1.17 --- include.t 29 Mar 2002 07:10:33 -0000 1.16 +++ include.t 5 Apr 2002 07:27:29 -0000 1.17 @@ -11,6 +11,9 @@ my ($doc); my $dir = "/modules/include/"; my $have_apache_2 = have_apache 2; +my $vars = Apache::Test::vars(); +my $docroot = $vars->{documentroot}; + my %test = ( "echo.shtml" => "echo.shtml", @@ -63,10 +66,11 @@ # # in addition to $tests, there are 1 GET test, 9 XBitHack tests, -# 2 exec cgi tests, and 2 malformed-ssi-directive tests +# 2 exec cgi tests, 2 malformed-ssi-directive tests, and 6 tests +# that use mod_bucketeer to construct brigades for mod_include # my $tests = keys %test; -plan tests => $tests + 14, have_module 'include'; +plan tests => $tests + 20, have_module 'include'; foreach $doc (sort keys %test) { ok t_cmp($test{$doc}, @@ -181,6 +185,69 @@ "XBitHack full [0554]" ); + +### MOD_BUCKETEER+MOD_INCLUDE TESTS +# we can use mod_bucketeer to create edge conditions for mod_include, since +# it allows us to create bucket and brigade boundaries wherever we want +if (have_module 'mod_bucketeer') { + + $expected = "____ _____ _____ ___________________ ". + "##################################1/8 ". + "##################################2/8 ". + "##################################3/8 ". + "##################################4/8 ". + "##################################5/8 ". + "##################################6/8$docroot ". + "##################################7/8 ". + "##################################8/8 ". + "@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@"; + + $doc = "bucketeer/y.shtml"; + ok t_cmp($expected, + super_chomp(GET_BODY "$dir$doc"), + "GET $dir$doc" + ); + + $expected = "____ ___________________________________". + "________________________________________". + "___ ____________________________________". + "________________________________________". + "__________ ___________________ ". + "##################################### ". + "##################################### ". + "##################################### ". + "##################################### ". + "##################################### ". + "##################################### ". + "##################################### ". + "##################################### ". + "@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@"; + + for (0..3) { + $doc = "bucketeer/y$_.shtml"; + my ($body) = super_chomp(GET_BODY "$dir$doc"); + $body =~ s/\002/^B/g; + $body =~ s/\006/^F/g; + $body =~ s/\020/^P/g; + ok t_cmp($expected, + $body, + "GET $dir$doc" + ); + } + + $expected = "[an error occurred while processing this directive]"; + $doc = "bucketeer/y4.shtml"; + ok t_cmp($expected, + super_chomp(GET_BODY "$dir$doc"), + "GET $dir$doc" + ); + +} +else { + for (1..6) { + skip "Skipping bucket boundary tests, no mod_bucketeer", 1; + } +} sub super_chomp { my ($body) = shift; 1.1 httpd-test/perl-framework/t/htdocs/modules/include/bucketeer/y.shtml Index: y.shtml =================================================================== ____ _____ _____ ___________________ </table> ##################################1/8</tr> ##################################2/8</tr> ##################################3/8</tr> ##################################4/8</tr> ##################################5/8</tr> ##################################6/8</tr> ##################################7/8</tr> ##################################8/8 @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@ 1.1 httpd-test/perl-framework/t/htdocs/modules/include/bucketeer/y0.shtml Index: y0.shtml =================================================================== ____ ______________________________________________________________________________ ______________________________________________________________________________________ ___________________ </table> #####################################</tr> #####################################</tr> #####################################</tr> #####################################</tr> #####################################</tr> #####################################</tr> #####################################</tr> #####################################</tr> @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@ 1.1 httpd-test/perl-framework/t/htdocs/modules/include/bucketeer/y1.shtml Index: y1.shtml =================================================================== ____ ______________________________________________________________________________ ______________________________________________________________________________________ ___________________ </table> #####################################</tr> #####################################</tr> #####################################</tr> #####################################</tr> #####################################</tr> #####################################</tr> #####################################</tr> #####################################</tr> @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@ 1.1 httpd-test/perl-framework/t/htdocs/modules/include/bucketeer/y2.shtml Index: y2.shtml =================================================================== ____ ______________________________________________________________________________ ______________________________________________________________________________________ ___________________ </table> #####################################</tr> #####################################</tr> #####################################</tr> #####################################</tr> #####################################</tr> #####################################</tr> #####################################</tr> #####################################</tr> @@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@ 1.1 httpd-test/perl-framework/t/htdocs/modules/include/bucketeer/y3.shtml <> 1.1 httpd-test/perl-framework/t/htdocs/modules/include/bucketeer/y4.shtml <>