~ubuntu-branches/ubuntu/feisty/libapache2-mod-perl2/feisty-security

« back to all changes in this revision

Viewing changes to t/response/TestVhost/config.pm

  • 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
package TestVhost::config;
 
2
 
 
3
# Test whether under threaded mpms (and not) a vhost with 'PerlOptions
 
4
# +Parent', can run <Perl> sections, which call into config again via
 
5
# add_config().
 
6
 
 
7
use strict;
 
8
use warnings FATAL => 'all';
 
9
 
 
10
use Apache::Test;
 
11
use Apache::TestUtil;
 
12
 
 
13
use Apache::RequestUtil ();
 
14
use APR::Table ();
 
15
 
 
16
use File::Spec::Functions qw(canonpath catdir);
 
17
 
 
18
use Apache::Const -compile => 'OK';
 
19
 
 
20
# using a different from 'handler' name on purpose, to make sure
 
21
# that the module is preloaded at the server startup
 
22
sub my_handler {
 
23
    my $r = shift;
 
24
 
 
25
    plan $r, tests => 1;
 
26
 
 
27
    {
 
28
        my $expected = $r->document_root;
 
29
        my $received = $r->dir_config->get('DocumentRootCheck');
 
30
        ok t_cmp(canonpath($expected), canonpath($received), "DocumentRoot");
 
31
    }
 
32
 
 
33
    Apache::OK;
 
34
}
 
35
 
 
36
1;
 
37
__END__
 
38
<NoAutoConfig>
 
39
<VirtualHost TestVhost::config>
 
40
    DocumentRoot @documentroot@/vhost
 
41
 
 
42
    <IfDefine PERL_USEITHREADS>
 
43
        # a new interpreter pool
 
44
        PerlOptions +Parent
 
45
        PerlInterpStart         1
 
46
        PerlInterpMax           1
 
47
        PerlInterpMinSpare      1
 
48
        PerlInterpMaxSpare      1
 
49
    </IfDefine>
 
50
 
 
51
    # use test system's @INC
 
52
    PerlSwitches -I@serverroot@
 
53
 
 
54
    # mp2 modules
 
55
    PerlRequire "@serverroot@/conf/modperl_inc.pl"
 
56
 
 
57
    # private to this vhost stuff
 
58
    PerlRequire "@documentroot@/vhost/startup.pl"
 
59
 
 
60
    # <Location /TestVhost__config> container is added via add_config
 
61
    # in t/htdocs/vhost/startup.pl
 
62
</VirtualHost>
 
63
</NoAutoConfig>