gozer 2004/08/13 21:29:50
Modified: t/response/TestDirective cmdparms.pm
Log:
Whitespace and indentation cleanups
Revision Changes Path
1.3 +19 -25 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.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- cmdparms.pm 13 Aug 2004 05:27:11 -0000 1.2
+++ cmdparms.pm 14 Aug 2004 04:29:50 -0000 1.3
@@ -5,6 +5,7 @@
use Apache::CmdParms ();
use Apache::Module ();
+
use Apache::Test;
use Apache::TestUtil;
@@ -34,41 +35,32 @@
},
);
-my @methods = qw(
-cmd
-context
-directive
-info
-limited
-override
-path
-pool
-server
-temp_pool
-);
+my @methods = qw(cmd context directive info limited override path
+ pool server temp_pool);
sub TestCmdParms {
- my ($self, $parms, $args) = @_;
+ my($self, $parms, $args) = @_;
my $srv_cfg = $self->get_config($parms->server);
foreach my $method (@methods) {
$srv_cfg->{$args}{$method} = $parms->$method();
}
- $srv_cfg->{$args}{check_ctx} =
$parms->check_cmd_context(Apache::NOT_IN_LOCATION);
+ $srv_cfg->{$args}{check_ctx} =
+ $parms->check_cmd_context(Apache::NOT_IN_LOCATION);
}
sub get_config {
- my ($self, $s) = (shift, shift);
+ my($self, $s) = (shift, shift);
Apache::Module->get_config($self, $s, @_);
}
### response handler ###
sub handler : method {
- my ($self, $r) = @_;
+ my($self, $r) = @_;
my $override;
my $srv_cfg = $self->get_config($r->server);
-
+
plan $r, tests => 6 + ( 8 * keys(%$srv_cfg) );
-
+
foreach my $cfg (values %$srv_cfg) {
ok t_cmp (ref($cfg->{cmd}), 'Apache::Command', 'cmd');
ok t_cmp (ref($cfg->{context}), 'Apache::ConfVector', 'context');
@@ -79,30 +71,32 @@
ok t_cmp ($cfg->{limited}, -1, 'limited');
ok t_cmp ($cfg->{info}, 'cmd_data', 'cmd_data');
}
-
+
my $vhost = $srv_cfg->{Vhost};
-
+
$override = Apache::RSRC_CONF |
Apache::OR_INDEXES |
Apache::OR_FILEINFO |
Apache::OR_OPTIONS;
-
+
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};
-
+
$override = Apache::ACCESS_CONF |
Apache::OR_INDEXES |
Apache::OR_AUTHCFG |
Apache::OR_FILEINFO |
Apache::OR_OPTIONS |
Apache::OR_LIMIT;
-
+
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');
+ ok t_cmp ($loc->{check_ctx}, KEY .
+ ' cannot occur within <Location> section', 'check_cmd_ctx');
+
return Apache::OK;
}