File: module.pm

package info (click to toggle)
libapreq2 2.17-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,164 kB
  • sloc: ansic: 8,283; perl: 5,451; sh: 4,627; cpp: 380; makefile: 270; javascript: 186
file content (35 lines) | stat: -rw-r--r-- 779 bytes parent folder | download | duplicates (15)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package TestAPI::module;

use strict;
use warnings FATAL => 'all';

use Apache::Test;
use Apache::TestUtil;

use APR::Request::Apache2;

sub handler {
    my $r = shift;
    plan $r, tests => 9;

    my $req = APR::Request::Apache2->handle($r);
    ok $req->isa("APR::Request::Apache2");

    ok t_cmp $req->brigade_limit, 256 * 1024, "default brigade limit is 256K";
    ok $req->brigade_limit(1024);
    ok t_cmp $req->brigade_limit, 1024, "brigade_limit reset to 1K";

    ok $req->read_limit(1024 * 1024);
    ok t_cmp $req->read_limit, 1024 * 1024, "read_limit reset to 1M";

    ok not defined $req->temp_dir;
    ok $req->temp_dir("/tmp");
    ok t_cmp $req->temp_dir, "/tmp", "temp dir reset to /tmp";

    # XXX parse, header_in & header_out tests

    return 0;
}


1;