dougm 02/03/29 08:11:35
Added: perl-framework/t/htdocs/modules/include footer.shtml
header.shtml virtual.shtml
perl-framework/t/modules include2.t
Log:
adapted test from modperl-2.0 that dumps core with httpd-2.0 HEAD
Revision Changes Path
1.1
httpd-test/perl-framework/t/htdocs/modules/include/footer.shtml
Index: footer.shtml
===================================================================
<hr>
<h5>footer</h5>
1.1
httpd-test/perl-framework/t/htdocs/modules/include/header.shtml
Index: header.shtml
===================================================================
<html>
<head>
<title><!--#echo var="QUERY_STRING" --></title>
<meta http-equiv="Content-Type" content="text/html">
</head>
<h1><!--#echo var="QUERY_STRING" --></h1>
1.1
httpd-test/perl-framework/t/htdocs/modules/include/virtual.shtml
Index: virtual.shtml
===================================================================
<!--#include virtual="/modules/include/header.shtml?mod_include test" -->
Hello World
<p align=right>[<a href="../index.html">back</a>]</p>
<!--#include virtual="/modules/include/footer.shtml" -->
1.1 httpd-test/perl-framework/t/modules/include2.t
Index: include2.t
===================================================================
use strict;
use warnings FATAL => 'all';
use Apache::Test;
use Apache::TestRequest;
use Apache::TestUtil;
my @patterns = (
'mod_include test',
'Hello World',
'footer',
);
plan tests => 2 + @patterns, ['include'];
my $location = "/modules/include/virtual.shtml";
my($res, $str);
$res = GET $location;
ok $res->is_success;
$str = $res->content;
ok $str;
for my $pat (@patterns) {
ok t_cmp(qr{$pat}, $str, "/$pat/");
}