dougm       01/04/02 21:35:13

  Modified:    Apache-Test/t TEST
  Added:       Apache-Test/t/conf extra.conf.in
  Log:
  add example example.conf.in and howto add replacement variables
  
  Revision  Changes    Path
  1.3       +17 -0     modperl-2.0/Apache-Test/t/TEST
  
  Index: TEST
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/Apache-Test/t/TEST,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TEST      2001/04/03 04:23:45     1.2
  +++ TEST      2001/04/03 04:35:11     1.3
  @@ -11,4 +11,21 @@
   
   our @ISA = qw(Apache::TestRun);
   
  +#subclass new_test_config to add some config vars which will
  +#be replaced in generated config, see t/conf/extra.conf.in
  +
  +#'make test' runs -clean by default, so to actually see the replacements:
  +#perl t/TEST apxs ...
  +#cat t/conf/extra.conf
  +#perl t/TEST -clean
  +
  +sub new_test_config {
  +    my $self = shift;
  +
  +    $self->{conf_opts}->{authname}      = 'gold club';
  +    $self->{conf_opts}->{allowed_users} = 'dougm sterling';
  +
  +    return $self->SUPER::new_test_config;
  +}
  +
   MyTest->new->run(@ARGV);
  
  
  
  1.1                  modperl-2.0/Apache-Test/t/conf/extra.conf.in
  
  Index: extra.conf.in
  ===================================================================
  #this file will be Include-d by @ServerRoot@/httpd.conf
  
  #the subclass inside t/TEST added the authname and allowed_users variables
  
  <Location /howard_street>
      AuthName "@authname@"
      AuthType Basic
      AuthUserFile "@ServerRoot@/.htpasswd
      require user "@allowed_users@"
  </Location>
  
  
  

Reply via email to