aboutsummaryrefslogtreecommitdiffstats
path: root/t/003safesys.t
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2015-03-16 18:16:53 +0100
committerFrédéric Buclin <LpSolit@gmail.com>2015-03-16 18:16:53 +0100
commitf5fb20f4c9fdec61cecfa8a2a7b49b5f5a2e62b8 (patch)
tree9c1f894fea4f768c6e5c5ed2ff15f0573d71da1a /t/003safesys.t
parentc26e64e4f13bb7e6d29ab2b1f27bbe26ff048e8b (diff)
downloadbugs-f5fb20f4c9fdec61cecfa8a2a7b49b5f5a2e62b8.tar
bugs-f5fb20f4c9fdec61cecfa8a2a7b49b5f5a2e62b8.tar.gz
bugs-f5fb20f4c9fdec61cecfa8a2a7b49b5f5a2e62b8.tar.bz2
bugs-f5fb20f4c9fdec61cecfa8a2a7b49b5f5a2e62b8.tar.xz
bugs-f5fb20f4c9fdec61cecfa8a2a7b49b5f5a2e62b8.zip
Bug 1137669: 003safesys.t doesn't test any file due to a missing -T argument (and broken syntax in Support::Systemexec)
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 2a257ffb9..443f96415 100644
--- a/t/003safesys.t
+++ b/t/003safesys.t
@@ -40,7 +40,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");