macrobat has asked for the wisdom of the Perl Monks concerning the following question:
Problem: I can't get it to pass my lcroak.t test. If I call lcroak directly, then the test dies, as you'd expect when you call croak. But that's considered a failure by Test::Harness's prove utility.
Alternately, I can throw an eval loop around the lcroak call. But that redirects croak messages into $@, so subsequent tests, to see if my redirection worked, fail.
Anyone see a way around this?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Testing redirected croak messages
by chromatic (Archbishop) on Oct 27, 2005 at 23:12 UTC | |
by macrobat (Beadle) on Oct 28, 2005 at 00:02 UTC | |
by chromatic (Archbishop) on Oct 28, 2005 at 06:59 UTC | |
|
Re: Testing redirected croak messages
by bluto (Curate) on Oct 27, 2005 at 23:54 UTC | |
by macrobat (Beadle) on Oct 28, 2005 at 00:25 UTC | |
|
Re: Testing redirected croak messages
by xdg (Monsignor) on Oct 28, 2005 at 09:03 UTC | |
|
Re: Testing redirected croak messages
by macrobat (Beadle) on Oct 28, 2005 at 19:47 UTC |