projects
/
p5sagit/strictures.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
fc2cc31
)
wait until STDERR is restored before rethrowing error in test
Graham Knop [Wed, 27 May 2015 07:08:11 +0000 (
03:08
-0400)]
t/extras.t
patch
|
blob
|
blame
|
history
diff --git
a/t/extras.t
b/t/extras.t
index
cef6a6c
..
2763d1c
100644
(file)
--- a/
t/extras.t
+++ b/
t/extras.t
@@
-90,14
+90,16
@@
use strictures;
{
open my $fh, '>', \(my $str = '');
+ my $e;
{
local *STDERR = $fh;
eval qq{
#line 1 "t/load_fail.t"
use strictures;
1;
- } or die "$@";
+ } or $e = "$@";
}
+ die $e if defined $e;
strictures->import;
like(
@@
-109,14
+111,16
@@
use strictures;
{
open my $fh, '>', \(my $str = '');
+ my $e;
{
local *STDERR = $fh;
eval qq{
#line 1 "t/load_fail.t"
use strictures;
1;
- } or die "$@";
+ } or $e = "$@";
}
+ die $e if defined $e;
is $str, '', "extra dep load failure is not reported a second time";
}