Commit f5fb20f4 authored by Frédéric Buclin's avatar Frédéric Buclin

Bug 1137669: 003safesys.t doesn't test any file due to a missing -T argument…

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
parent c26e64e4
...@@ -40,7 +40,16 @@ my $perlapp = "\"$^X\""; ...@@ -40,7 +40,16 @@ my $perlapp = "\"$^X\"";
foreach my $file (@testitems) { foreach my $file (@testitems) {
$file =~ s/\s.*$//; # nuke everything after the first space (#comment) $file =~ s/\s.*$//; # nuke everything after the first space (#comment)
next if (!$file); # skip null entries 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`; my $loginfo=`$command`;
if ($loginfo =~ /arguments for Support::Systemexec::(system|exec)/im) { if ($loginfo =~ /arguments for Support::Systemexec::(system|exec)/im) {
ok(0,"$file DOES NOT use proper system or exec calls"); ok(0,"$file DOES NOT use proper system or exec calls");
......
...@@ -11,14 +11,15 @@ use 5.10.1; ...@@ -11,14 +11,15 @@ use 5.10.1;
use strict; use strict;
use warnings; use warnings;
require Exporter; use parent qw(Exporter);
@ISA = qw(Exporter); @Support::Systemexec::EXPORT = qw(system exec);
@EXPORT = qw(system exec);
@EXPORT_OK = qw();
sub system($$@) { sub system($$@) {
1; 1;
} }
sub exec($$@) { sub exec($$@) {
1; 1;
} }
1; 1;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment