summaryrefslogtreecommitdiffstats
path: root/t/003safesys.t
diff options
context:
space:
mode:
authorjake%acutex.net <>2001-10-25 03:41:49 +0200
committerjake%acutex.net <>2001-10-25 03:41:49 +0200
commit3d46ba59b73c584ab534896c2ae61398ef3940d9 (patch)
tree1a7bb625032e6d1919a5d2728d2068da250bed99 /t/003safesys.t
parent1339fc04ffb9046614d71202b3b0c97b453f7f24 (diff)
downloadbugzilla-3d46ba59b73c584ab534896c2ae61398ef3940d9.tar.gz
bugzilla-3d46ba59b73c584ab534896c2ae61398ef3940d9.tar.xz
Don't rely on the TEST_VERBOSE environment variable (no longer exported from runtests.sh) and instead print to the TESTOUT file handle pulled in from Test::More. This will allow the testing backend to check for verbosity rather than having to handle it in the .t files.
Diffstat (limited to 't/003safesys.t')
-rw-r--r--t/003safesys.t6
1 files changed, 4 insertions, 2 deletions
diff --git a/t/003safesys.t b/t/003safesys.t
index 94d137aa9..98e9d2d64 100644
--- a/t/003safesys.t
+++ b/t/003safesys.t
@@ -44,7 +44,9 @@ BEGIN { use Test::More tests => $tests; }
use strict;
my @testitems = @Support::Files::testitems;
-my $verbose = $::ENV{TEST_VERBOSE};
+# Capture the TESTERR from Test::More for printing errors.
+# This will handle verbosity for us automatically
+*TESTOUT = \*Test::More::TESTOUT;
my $perlapp = $^X;
foreach my $file (@testitems) {
@@ -54,7 +56,7 @@ foreach my $file (@testitems) {
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; }
+ print TESTOUT $loginfo;
} else {
ok(1,"$file uses proper system and exec calls");
}