You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-commits@perl.apache.org by to...@apache.org on 2011/07/28 12:58:58 UTC
svn commit: r1151790 - in /perl/Apache-Test/trunk/lib/Apache: TestConfig.pm
TestConfigPerl.pm
Author: torsten
Date: Thu Jul 28 10:58:57 2011
New Revision: 1151790
URL: http://svn.apache.org/viewvc?rev=1151790&view=rev
Log:
Add comments about the source files of auto configurated tests to
the generated httpd.conf and improve indentation a bit.
For example:
before:
<IfModule mod_perl.c>
<Location /TestDirective__perldo>
SetHandler modperl
PerlResponseHandler TestDirective::perldo
</Location>
</IfModule>
after:
# included from t/response/TestDirective/perldo.pm
<IfModule mod_perl.c>
<Location /TestDirective__perldo>
SetHandler modperl
PerlResponseHandler TestDirective::perldo
</Location>
</IfModule>
# end of t/response/TestDirective/perldo.pm
Modified:
perl/Apache-Test/trunk/lib/Apache/TestConfig.pm
perl/Apache-Test/trunk/lib/Apache/TestConfigPerl.pm
Modified: perl/Apache-Test/trunk/lib/Apache/TestConfig.pm
URL: http://svn.apache.org/viewvc/perl/Apache-Test/trunk/lib/Apache/TestConfig.pm?rev=1151790&r1=1151789&r2=1151790&view=diff
==============================================================================
--- perl/Apache-Test/trunk/lib/Apache/TestConfig.pm (original)
+++ perl/Apache-Test/trunk/lib/Apache/TestConfig.pm Thu Jul 28 10:58:57 2011
@@ -557,6 +557,7 @@ sub massage_config_args {
}
}
else {
+ $data=~s/\n(?!\z)/\n /g;
$args .= " $data";
}
$args .= "</$directive>\n";
@@ -610,7 +611,8 @@ sub add_config_hooks_run {
for (@{ $self->{$where} }) {
$self->replace;
- print $out "$_\n";
+ s/\n?$/\n/;
+ print $out "$_";
}
}
Modified: perl/Apache-Test/trunk/lib/Apache/TestConfigPerl.pm
URL: http://svn.apache.org/viewvc/perl/Apache-Test/trunk/lib/Apache/TestConfigPerl.pm?rev=1151790&r1=1151789&r2=1151790&view=diff
==============================================================================
--- perl/Apache-Test/trunk/lib/Apache/TestConfigPerl.pm (original)
+++ perl/Apache-Test/trunk/lib/Apache/TestConfigPerl.pm Thu Jul 28 10:58:57 2011
@@ -540,6 +540,13 @@ sub configure_pm_tests {
my ($file, $module, $subdir, $status) = @$entry;
my @args = ();
+ my $file_display;
+ {
+ $file_display=$file;
+ my $topdir=$self->{vars}->{top_dir};
+ $file_display=~s!^\Q$topdir\E(.)(?:\1)*!!;
+ }
+ $self->postamble("\n# included from $file_display");
my $directives = $self->add_module_config($file, \@args);
$module =~ s,\.pm$,,;
$module =~ s/^[a-z]://i; #strip drive if any
@@ -568,10 +575,7 @@ sub configure_pm_tests {
debug "configuring $module";
- if ($directives->{noautoconfig}) {
- $self->postamble(""); # which adds "\n"
- }
- else {
+ unless ($directives->{noautoconfig}) {
if (my $cv = $add_hook_config{$hook}) {
$self->$cv($module, \@args);
}
@@ -595,6 +599,7 @@ sub configure_pm_tests {
$self->postamble(IfModule => 'mod_perl.c', $cfg);
}
}
+ $self->postamble("# end of $file_display\n");
$self->write_pm_test($module, lc $sub, map { lc } @base);
}