Author: dagolden
Date: Thu Feb 19 19:36:26 2009
New Revision: 12518
Modified:
CPANPLUS-Dist-Build/trunk/ (props changed)
CPANPLUS-Dist-Build/trunk/t/02_CPANPLUS-Dist-Build.t
Log:
suppress [ERROR] messages in tests
Modified: CPANPLUS-Dist-Build/trunk/t/02_CPANPLUS-Dist-Build.t
==============================================================================
--- CPANPLUS-Dist-Build/trunk/t/02_CPANPLUS-Dist-Build.t (original)
+++ CPANPLUS-Dist-Build/trunk/t/02_CPANPLUS-Dist-Build.t Thu Feb 19
19:36:26 2009
@@ -222,16 +222,15 @@
### clear errors
CPANPLUS::Error->flush;
- ### since we're die'ing in the Build.PL, do a local *STDERR,
- ### so we dont spam the result through the test -- this is expected
- ### behaviour after all.
- ### also quell the warning for print() on unopened fh...
- diag("The following ERROR may be ignored:\n\n");
- my $rv = do {
- local $^W;
-# local *STDERR;
- $clone->prepare( force => 1 )
- };
+ ### since we're die'ing in the Build.PL, localize
+ ### $CPANPLUS::Error::ERROR_FH and redirect to devnull
+ ### so we dont spam the result through the test
+ ### as this is expected behaviour after all.
+ my $rv = do {
+ local *CPANPLUS::Error::ERROR_FH;
+ open $CPANPLUS::Error::ERROR_FH, ">", File::Spec->devnull;
+ $clone->prepare( force => 1 )
+ };
ok( !$rv, ' $mod->prepare failed' );
my $re = quotemeta( $build_pl );