~ubuntu-branches/ubuntu/edgy/libapache2-mod-perl2/edgy

« back to all changes in this revision

Viewing changes to ModPerl-Registry/t/nph.t

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2004-08-19 06:23:48 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040819062348-jxl4koqbtvgm8v2t
Tags: 1.99.14-4
Remove the LFS CFLAGS, and build-dep against apache2-*-dev (>= 2.0.50-10)
as we're backing out of the apache2/apr ABI transition.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
use strict;
 
2
use warnings FATAL => 'all';
 
3
 
 
4
use Apache::Test;
 
5
use Apache::TestUtil;
 
6
use Apache::TestRequest;
 
7
 
 
8
plan tests => 6;
 
9
 
 
10
my $url = "/nph/nph-foo.pl";
 
11
 
 
12
my %expected = (
 
13
    code    => '250',
 
14
    body    => "non-parsed headers body",
 
15
    headers => {
 
16
        'content-type' => 'text/text',
 
17
        'pragma' => 'no-cache',
 
18
        'cache-control' => 'must-revalidate, no-cache, no-store',
 
19
        'expires' => '-1',
 
20
    },
 
21
);
 
22
 
 
23
my $res = GET $url;
 
24
 
 
25
my %received = (
 
26
    code    => $res->code,
 
27
    body    => $res->content,
 
28
    headers => $res->headers, # LWP lc's the headers
 
29
);
 
30
 
 
31
for my $key (keys %expected) {
 
32
    my $expected = $expected{$key};
 
33
    my $received = $received{$key};
 
34
    if ($key eq 'headers') {
 
35
        for my $header (keys %$expected) {
 
36
            ok t_cmp(
 
37
                $expected->{$header},
 
38
                $received->{$header},
 
39
                "test header $header"
 
40
            );
 
41
        }
 
42
    }
 
43
    else {
 
44
        ok t_cmp(
 
45
            $expected,
 
46
            $received,
 
47
            "test key: $key"
 
48
        );
 
49
    }
 
50
}
 
51