aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2015-03-16 18:18:49 +0100
committerFrédéric Buclin <LpSolit@gmail.com>2015-03-16 18:18:49 +0100
commitfc4a6dd5899ebe2e9c731c2c76b1337b2ab543d2 (patch)
tree02ba52a85779eb2e6789fecde43c1f39c21b8b2c /t/003safesys.t
parentBug 1138463: mod_perl does not support Apache 2.4 directives (diff)
downloadbugzilla-fc4a6dd5899ebe2e9c731c2c76b1337b2ab543d2.tar.gz
bugzilla-fc4a6dd5899ebe2e9c731c2c76b1337b2ab543d2.tar.bz2
bugzilla-fc4a6dd5899ebe2e9c731c2c76b1337b2ab543d2.zip
Bug 1137669: 003safesys.t doesn't test any file due to a missing -T argument
r=dylan a=glob
Diffstat (limited to 't/003safesys.t')
-rw-r--r--t/003safesys.t11
1 files changed, 10 insertions, 1 deletions
diff --git a/t/003safesys.t b/t/003safesys.t
index 0d6a215b1..17593fbe7 100644
--- a/t/003safesys.t
+++ b/t/003safesys.t
@@ -38,7 +38,16 @@ my $perlapp = "\"$^X\"";
foreach my $file (@testitems) {
$file =~ s/\s.*$//; # nuke everything after the first space (#comment)
next if (!$file); # skip null entries
- my $command = "$perlapp -c -It -MSupport::Systemexec $file 2>&1";
+
+ open(my $fh2, '<', $file);
+ my $bang = <$fh2>;
+ close $fh2;
+
+ my $T = "";
+ if ($bang =~ m/#!\S*perl\s+-.*T/) {
+ $T = "T";
+ }
+ my $command = "$perlapp -c$T -It -MSupport::Systemexec $file 2>&1";
my $loginfo=`$command`;
if ($loginfo =~ /arguments for Support::Systemexec::(system|exec)/im) {
ok(0,"$file DOES NOT use proper system or exec calls");