summaryrefslogtreecommitdiffstats
path: root/t/003safesys.t
diff options
context:
space:
mode:
authorjake%acutex.net <>2001-10-20 07:39:46 +0200
committerjake%acutex.net <>2001-10-20 07:39:46 +0200
commited4af4249961a69449820e27b0baaf5116142b9e (patch)
tree09425865e2c77171faec1a1a66d2210b7dc6fdf7 /t/003safesys.t
parentb929c22527a9f97d4e03937d255542dfb5384f02 (diff)
downloadbugzilla-ed4af4249961a69449820e27b0baaf5116142b9e.tar.gz
bugzilla-ed4af4249961a69449820e27b0baaf5116142b9e.tar.xz
Bug 103664 - Tests should "use strict;" and not contain any tabs. We should also use the TEST_VERBOSE environment variable instead of VERBOSE.
Patch by David D. Kilzer <ddkilzer@theracingworld.com> Additional edits by myself to add the emacs mode line. Also, the change to runtests.sh was done by me.
Diffstat (limited to 't/003safesys.t')
-rw-r--r--t/003safesys.t32
1 files changed, 18 insertions, 14 deletions
diff --git a/t/003safesys.t b/t/003safesys.t
index d11455513..94d137aa9 100644
--- a/t/003safesys.t
+++ b/t/003safesys.t
@@ -1,3 +1,4 @@
+# -*- 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
@@ -40,19 +41,22 @@ BEGIN { use Support::Files; }
BEGIN { $tests = @Support::Files::testitems; }
BEGIN { use Test::More tests => $tests; }
-@testitems = @Support::Files::testitems;
-my $verbose = $::ENV{VERBOSE};
-$perlapp=$^X;
-foreach $file (@testitems) {
- $file =~ s/\s.*$//; # nuke everything after the first space (#comment)
- next if (!$file); # skip null entries
- $command = "$perlapp -c -It/Support -MSystemexec $file 2>&1";
- $loginfo=`$command`;
- if ($loginfo =~ /arguments for Systemexec::system|exec/im) {
- ok(0,"$file DOES NOT use proper system or exec calls");
- if ($verbose) { print STDERR $loginfo; }
- } else {
- ok(1,"$file uses proper system and exec calls");
- }
+use strict;
+
+my @testitems = @Support::Files::testitems;
+my $verbose = $::ENV{TEST_VERBOSE};
+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");
+ if ($verbose) { print STDERR $loginfo; }
+ } else {
+ ok(1,"$file uses proper system and exec calls");
+ }
}