summaryrefslogtreecommitdiffstats
path: root/t/001compile.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/001compile.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/001compile.t')
-rw-r--r--t/001compile.t10
1 files changed, 5 insertions, 5 deletions
diff --git a/t/001compile.t b/t/001compile.t
index c297241df..4fc568662 100644
--- a/t/001compile.t
+++ b/t/001compile.t
@@ -45,8 +45,9 @@ use strict;
# First now we test the scripts
my @testitems = @Support::Files::testitems;
-#my %warnings;
-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) {
@@ -63,15 +64,14 @@ foreach my $file (@testitems) {
my $loginfo=`$command`;
#print '@@'.$loginfo.'##';
if ($loginfo =~ /syntax ok$/im) {
-# $warnings{$_} = 1 foreach ($loginfo =~ /\((W.*?)\)/mg);
if ($loginfo ne "$file syntax OK\n") {
- if ($verbose) { print STDERR $loginfo; }
+ print TESTOUT $loginfo;
ok(0,$file."--WARNING");
} else {
ok(1,$file);
}
} else {
- if ($verbose) { print STDERR $loginfo; }
+ print TESTOUT $loginfo;
ok(0,$file."--ERROR");
}
}