You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-cvs@httpd.apache.org by jo...@apache.org on 2004/05/18 14:22:04 UTC
cvs commit: httpd-test/perl-framework/t/modules asis.t
jorton 2004/05/18 05:22:04
Modified: perl-framework/t/conf extra.conf.in
Added: perl-framework/t/htdocs/modules/asis foo.asis forbid.asis
notfound.asis
perl-framework/t/modules asis.t
Log:
Add simple mod_asis tests.
Revision Changes Path
1.48 +10 -0 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.47
retrieving revision 1.48
diff -d -u -r1.47 -r1.48
--- extra.conf.in 12 Apr 2004 15:12:42 -0000 1.47
+++ extra.conf.in 18 May 2004 12:22:04 -0000 1.48
@@ -234,6 +234,16 @@
</Location>
##
+## mod_asis test config
+##
+
+<IfModule mod_asis.c>
+ <Directory @SERVERROOT@/htdocs/modules/asis>
+ AddHandler send-as-is asis
+ </Directory>
+</IfModule>
+
+##
## mod_headers test config
##
1.1 httpd-test/perl-framework/t/htdocs/modules/asis/foo.asis
Index: foo.asis
===================================================================
Status: 200 OK
Content-Type: text/html
This is asis content.
1.1 httpd-test/perl-framework/t/htdocs/modules/asis/forbid.asis
Index: forbid.asis
===================================================================
Status: 403 No Such Luck, Mate
Content-Type: text/html
This is a 403 response, lah di dah.
1.1 httpd-test/perl-framework/t/htdocs/modules/asis/notfound.asis
Index: notfound.asis
===================================================================
Status: 404 No Such File, Mate
Content-Type: text/html
This is a 404 response, lah di dah.
1.1 httpd-test/perl-framework/t/modules/asis.t
Index: asis.t
===================================================================
use strict;
use warnings FATAL => 'all';
use Apache::Test;
use Apache::TestRequest;
use Apache::TestUtil;
##
## mod_asis tests
##
plan tests => 3;
my $body = GET_BODY "/modules/asis/foo.asis";
ok t_cmp("This is asis content.\n", $body, "asis content OK");
my $rc = GET_RC "/modules/asis/notfound.asis";
ok t_cmp(404, $rc, "asis gave 404 error");
$rc = GET_RC "/modules/asis/forbid.asis";
ok t_cmp(403, $rc, "asis gave 403 error");