From 3d46ba59b73c584ab534896c2ae61398ef3940d9 Mon Sep 17 00:00:00 2001 From: "jake%acutex.net" <> Date: Thu, 25 Oct 2001 01:41:49 +0000 Subject: 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. --- t/003safesys.t | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 't/003safesys.t') 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"); } -- cgit v1.2.3-24-g4f1b