From: Graham Knop Date: Thu, 16 Jan 2014 18:27:37 +0000 (-0500) Subject: don't silence errors in tests X-Git-Tag: v1.005006~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b43e54c0f8ce75f52e91d2eb255e5a0def148987;p=p5sagit%2Fstrictures.git don't silence errors in tests --- diff --git a/t/extras.t b/t/extras.t index d314290..b8c5ecf 100644 --- a/t/extras.t +++ b/t/extras.t @@ -90,12 +90,14 @@ use strictures; { open my $fh, '>', \(my $str = ''); - local *STDERR = $fh; - eval qq{ + { + local *STDERR = $fh; + eval qq{ #line 1 "t/load_fail.t" use strictures; 1; - } or die "$@"; + } or die "$@"; + } strictures->import; like( @@ -107,12 +109,15 @@ use strictures; { open my $fh, '>', \(my $str = ''); - local *STDERR = $fh; - eval qq{ + { + local *STDERR = $fh; + eval qq{ #line 1 "t/load_fail.t" use strictures; 1; - } or die "$@"; + } or die "$@"; + } + is $str, '', "extra dep load failure is not reported a second time"; } }