Annotation of embedaddon/lighttpd/tests/mod-simplevhost.t, revision 1.1.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: $tf->{CONFIGFILE} = 'mod-simplevhost.conf';
                     18: 
                     19: ok($tf->start_proc == 0, "Starting lighttpd") or die();
                     20: 
                     21: $t->{REQUEST}  = ( <<EOF
                     22: GET /a/a.html HTTP/1.0
                     23: Host: www.example.org
                     24: EOF
                     25:  );
                     26: $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
                     27: ok($tf->handle_http($t) == 0, 'Check /a/a.html path');
                     28: 
                     29: $t->{REQUEST}  = ( <<EOF
                     30: GET /b/b.html HTTP/1.0
                     31: Host: www.example.org
                     32: EOF
                     33:  );
                     34: $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
                     35: ok($tf->handle_http($t) == 0, 'Check /b/b.html path');
                     36: 
                     37: ok($tf->stop_proc == 0, "Stopping lighttpd");

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