2
use warnings FATAL => 'all';
6
use Apache::TestRequest;
8
my $uri = "/TestAPI__lookup_uri";
10
use constant PREFIX => 0;
11
use constant SUFFIX => 1;
14
first => [2, 2], # all filters run twice
15
second => [1, 2], # the top level req filter skipped for the subreq
16
none => [1, 1], # no request filters run by subreq
17
default => [1, 1], # same as none
20
plan tests => scalar keys %opts;
22
while (my($filter, $runs) = each %opts) {
23
my $args = "subreq=lookup_uri;filter=$filter";
24
my $prefix = "pre+" x $runs->[PREFIX];
25
my $suffix = "+suf" x $runs->[SUFFIX];
26
my $expected = "$prefix$args$suffix";
27
my $received = GET_BODY_ASSERT "$uri?$args";
28
ok t_cmp $received, $expected, "$args";