gozer       2004/08/12 22:27:11

  Modified:    t/response/TestDirective cmdparms.pm perlloadmodule4.pm
  Log:
  Move test for Apache::CmdParms out of perlloadmodule4 and along with all
  the other Apache::CmdParms tests in directive/cmdparms
  
  Revision  Changes    Path
  1.2       +6 -3      modperl-2.0/t/response/TestDirective/cmdparms.pm
  
  Index: cmdparms.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/response/TestDirective/cmdparms.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- cmdparms.pm       13 Aug 2004 04:35:09 -0000      1.1
  +++ cmdparms.pm       13 Aug 2004 05:27:11 -0000      1.2
  @@ -21,6 +21,7 @@
       OR_LIMIT
       OR_OPTIONS
       RSRC_CONF
  +    NOT_IN_LOCATION
   );
   
   use constant KEY => "TestCmdParms";
  @@ -52,6 +53,7 @@
       foreach my $method (@methods) {
           $srv_cfg->{$args}{$method} = $parms->$method();
       }
  +    $srv_cfg->{$args}{check_ctx} = 
$parms->check_cmd_context(Apache::NOT_IN_LOCATION);
   }
   
   sub get_config {
  @@ -62,10 +64,10 @@
   ### response handler ###
   sub handler : method {
       my ($self, $r) = @_;
  -    
  +    my $override; 
       my $srv_cfg = $self->get_config($r->server);
       
  -    plan $r, tests => 4 + ( 8 * keys(%$srv_cfg) );
  +    plan $r, tests => 6 + ( 8 * keys(%$srv_cfg) );
       
       foreach my $cfg (values %$srv_cfg) {
           ok t_cmp (ref($cfg->{cmd}), 'Apache::Command', 'cmd');
  @@ -87,6 +89,7 @@
       
       ok t_cmp ($vhost->{override}, $override, 'override');
       ok t_cmp ($vhost->{path}, undef, 'path');
  +    ok t_cmp ($vhost->{check_ctx}, undef, 'check_cmd_ctx');
       
       my $loc = $srv_cfg->{Location};
       
  @@ -99,7 +102,7 @@
       
       ok t_cmp ($loc->{override}, $override, 'override');
       ok t_cmp ($loc->{path}, '/TestDirective__cmdparms', 'path');
  -
  +    ok t_cmp ($loc->{check_ctx}, KEY . ' cannot occur within <Location> section', 
'check_cmd_ctx');
       return Apache::OK;
   }
   
  
  
  
  1.7       +2 -7      modperl-2.0/t/response/TestDirective/perlloadmodule4.pm
  
  Index: perlloadmodule4.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/response/TestDirective/perlloadmodule4.pm,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- perlloadmodule4.pm        11 Aug 2004 23:03:18 -0000      1.6
  +++ perlloadmodule4.pm        13 Aug 2004 05:27:11 -0000      1.7
  @@ -22,7 +22,7 @@
   use Apache::Module ();
   use Apache::ServerUtil ();
   
  -use Apache::Const -compile => qw(OK NOT_IN_LOCATION);
  +use Apache::Const -compile => qw(OK);
   
   use constant KEY => "MyTest4";
   
  @@ -32,8 +32,6 @@
       my($self, $parms, $arg) = @_;
       $self->{+KEY} = $arg;
       
  -    $self->{KEY.'-Error'} = $parms->check_cmd_context(Apache::NOT_IN_LOCATION);
  -    
       unless ($parms->path) {
           my $srv_cfg = Apache::Module->get_config($self, $parms->server);
           $srv_cfg->{+KEY} = $arg;
  @@ -66,7 +64,7 @@
       my $dir_cfg = get_config($s, $r->per_dir_config);
       my $srv_cfg = get_config($s);
   
  -    plan $r, tests => 5;
  +    plan $r, tests => 3;
   
       ok $s->is_virtual;
   
  @@ -74,9 +72,6 @@
   
       ok t_cmp($srv_cfg->{+KEY}, "Vhost", "Section");
       
  -    ok t_cmp($dir_cfg->{KEY.'-Error'}, KEY . " cannot occur within <Location> 
section", "check_cmd_context");
  -    ok t_cmp($srv_cfg->{KEY.'-Error'}, undef, "check_cmd_context");
  -
       return Apache::OK;
   }
   
  
  
  

Reply via email to