Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
56d130c4
Commit
56d130c4
authored
Mar 16, 2015
by
Frédéric Buclin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 1137674: Merge t/003safesys.t with t/001compile.t
r=dylan a=glob
parent
2ccf81de
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
56 deletions
+3
-56
001compile.t
t/001compile.t
+3
-3
003safesys.t
t/003safesys.t
+0
-53
No files found.
t/001compile.t
View file @
56d130c4
...
...
@@ -49,12 +49,12 @@ sub compile_file {
$T = "T";
}
my $libs = '';
my $libs = '
-It
';
if ($ENV{PERL5LIB}) {
$libs = join " ", map { "-I\"$_\"" } split /$Config{path_sep}/, $ENV{PERL5LIB};
$libs
.
= join " ", map { "-I\"$_\"" } split /$Config{path_sep}/, $ENV{PERL5LIB};
}
my $perl = qq{"$^X"};
my $output = `$perl $libs -c$T $file 2>&1`;
my $output = `$perl $libs -c$T
-MSupport::Systemexec
$file 2>&1`;
chomp($output);
my $return_val = $?;
$output =~ s/^\Q$file\E syntax OK$//ms;
...
...
t/003safesys.t
deleted
100644 → 0
View file @
2ccf81de
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# This Source Code Form is "Incompatible With Secondary Licenses", as
# defined by the Mozilla Public License, v. 2.0.
#################
#Bugzilla Test 3#
###Safesystem####
use 5.10.1;
use strict;
use warnings;
use lib 't';
use Support::Files;
use Test::More tests => scalar(@Support::Files::testitems);
# Capture the TESTOUT from Test::More or Test::Builder for printing errors.
# This will handle verbosity for us automatically.
my $fh;
{
no warnings qw(unopened); # Don't complain about non-existent filehandles
if (-e \*Test::More::TESTOUT) {
$fh = \*Test::More::TESTOUT;
} elsif (-e \*Test::Builder::TESTOUT) {
$fh = \*Test::Builder::TESTOUT;
} else {
$fh = \*STDOUT;
}
}
my @testitems = @Support::Files::testitems;
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";
my $loginfo=`$command`;
if ($loginfo =~ /arguments for Support::Systemexec::(system|exec)/im) {
ok(0,"$file DOES NOT use proper system or exec calls");
print $fh $loginfo;
} else {
ok(1,"$file uses proper system and exec calls");
}
}
exit 0;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment