Annotation of embedaddon/lighttpd/tests/mod-ssi.t, revision 1.1

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;
        !            11: use Test::More tests => 4;
        !            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: # mod-cgi
        !            20: #
        !            21: $t->{REQUEST}  = ( <<EOF
        !            22: GET /ssi.shtml HTTP/1.0
        !            23: EOF
        !            24:  );
        !            25: $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => "/ssi.shtml\n" } ];
        !            26: ok($tf->handle_http($t) == 0, 'ssi - echo ');
        !            27: 
        !            28: 
        !            29: ## bug #280
        !            30: $t->{REQUEST}  = ( <<EOF
        !            31: GET /exec-date.shtml HTTP/1.0
        !            32: EOF
        !            33:  );
        !            34: $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => "2\n\n" } ];
        !            35: ok($tf->handle_http($t) == 0, 'ssi - echo ');
        !            36: 
        !            37: 
        !            38: ok($tf->stop_proc == 0, "Stopping lighttpd");
        !            39: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>