From 5f310e5b9e7afbd5badb17178349fefaaabfacce Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Thu, 30 Jun 2016 23:32:40 -0400 Subject: Bug 1283930 - Add Makefile.PL & local/lib/perl5 support to bmo/master + local symlink to data/ directory --- t/003safesys.t | 73 ---------------------------------------------------------- 1 file changed, 73 deletions(-) delete mode 100644 t/003safesys.t (limited to 't/003safesys.t') diff --git a/t/003safesys.t b/t/003safesys.t deleted file mode 100644 index a69500b7a..000000000 --- a/t/003safesys.t +++ /dev/null @@ -1,73 +0,0 @@ -# -*- Mode: perl; indent-tabs-mode: nil -*- -# -# The contents of this file are subject to the Mozilla Public -# License Version 1.1 (the "License"); you may not use this file -# except in compliance with the License. You may obtain a copy of -# the License at http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS -# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or -# implied. See the License for the specific language governing -# rights and limitations under the License. -# -# The Original Code are the Bugzilla Tests. -# -# The Initial Developer of the Original Code is Zach Lipton -# Portions created by Zach Lipton are -# Copyright (C) 2001 Zach Lipton. All -# Rights Reserved. -# -# Contributor(s): Zach Lipton - - -################# -#Bugzilla Test 3# -###Safesystem#### - -use strict; - -use lib 't'; - -use Support::Files; -use File::Slurp; - -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; -{ - local $^W = 0; # 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 $contents = read_file($file); - if ($contents !~ /\b(system|exec)\b/) { - ok(1,"$file does not contain any system or exec calls"); - next; - } - - 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; -- cgit v1.2.3-24-g4f1b