3 # add current source dir to the include-path
4 # we need this for make distcheck
5 (my $srcdir = $0) =~ s
,/[^/]+$,/,;
11 use Test
::More tests
=> 5;
14 my $tf = LightyTest
->new();
17 ok
($tf->start_proc == 0, "Starting lighttpd") or die();
19 $t->{REQUEST
} = ( <<EOF
20 GET /ssi.shtml HTTP/1.0
23 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => "/ssi.shtml\n" } ];
24 ok
($tf->handle_http($t) == 0, 'ssi - echo ');
28 $t->{REQUEST
} = ( <<EOF
29 GET /exec-date.shtml HTTP/1.0
32 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => "2\n\n" } ];
33 ok
($tf->handle_http($t) == 0, 'ssi - echo ');
36 $t->{REQUEST
} = ( <<EOF
37 GET /ssi-include.shtml HTTP/1.0
40 $t->{RESPONSE
} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => "/ssi-include.shtml\n/ssi-include.shtml\n/ssi-include.shtml\nssi-include\n\nssi-include\n\n" } ];
41 ok
($tf->handle_http($t) == 0, 'ssi - include');
44 ok
($tf->stop_proc == 0, "Stopping lighttpd");