Annotation of embedaddon/lighttpd/tests/mod-ssi.t, revision 1.1.1.2
1.1 misho 1: #!/usr/bin/env perl
2: BEGIN {
3: # add current source dir to the include-path
4: # we need this for make distcheck
5: (my $srcdir = $0) =~ s,/[^/]+$,/,;
6: unshift @INC, $srcdir;
7: }
8:
9: use strict;
10: use IO::Socket;
1.1.1.2 ! misho 11: use Test::More tests => 5;
1.1 misho 12: use LightyTest;
13:
14: my $tf = LightyTest->new();
15: my $t;
16:
17: ok($tf->start_proc == 0, "Starting lighttpd") or die();
18:
19: $t->{REQUEST} = ( <<EOF
20: GET /ssi.shtml HTTP/1.0
21: EOF
22: );
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 ');
25:
26:
27: ## bug #280
28: $t->{REQUEST} = ( <<EOF
29: GET /exec-date.shtml HTTP/1.0
30: EOF
31: );
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 ');
1.1.1.2 ! misho 34:
! 35:
! 36: $t->{REQUEST} = ( <<EOF
! 37: GET /ssi-include.shtml HTTP/1.0
! 38: EOF
! 39: );
! 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');
1.1 misho 42:
43:
44: ok($tf->stop_proc == 0, "Stopping lighttpd");
45:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>