Re: Conditional tests - SKIP, die, BAILOUT

2011-03-29 Thread Jozef Kutej
On 2011-03-29 23:05, Michael Ludwig wrote: >> Perhaps the 'bail_on_fail' or 'die_on_fail' functions from Test::Most >> would help you here? > > That's very convenient. perl -le 'use Test::More tests => 2; ok(1) or die; ok(1);' perl -le 'use Test::More tests => 2; ok(0) or die; ok(1);' Cheers, Jo

Re: [test-more-users] [ANNOUNCE] Test::Builder2 2.00_06

2011-03-29 Thread Michael G Schwern
(moving this to perl-qa because we decided to retire test-users) On 2011.3.30 6:52 AM, Michael Ludwig wrote: > Michael G Schwern schrieb am 27.01.2011 um 12:09 (+1000): >> use Test::More; >> use Test::Builder2::Tester; >> >> my $history = capture { >> plan tests => 2; >>

Re: Conditional tests - SKIP, die, BAILOUT

2011-03-29 Thread Michael Ludwig
Michael Ludwig schrieb am 29.03.2011 um 23:05 (+0200): > Andrew Moore schrieb am 29.03.2011 um 15:51 (-0500): > > On Tue, Mar 29, 2011 at 3:46 PM, Michael Ludwig > > wrote: > > > In a test script, tests may build up intermediate results which > > > later tests depend upon. Imagine the following in

Re: Conditional tests - SKIP, die, BAILOUT

2011-03-29 Thread Michael Ludwig
Greg Sabino Mullane schrieb am 29.03.2011 um 17:17 (-0400): > On Tue, Mar 29, 2011 at 10:46:20PM +0200, Michael Ludwig wrote: > ... > > my $tkn = $hu->token; # (1) Can't carry on without the token > > like $tkn, qr/abc/; # (2) Useless carrying on if this fails. > > One thing I've done is def

Re: Conditional tests - SKIP, die, BAILOUT

2011-03-29 Thread Greg Sabino Mullane
On Tue, Mar 29, 2011 at 10:46:20PM +0200, Michael Ludwig wrote: ... > my $tkn = $hu->token; # (1) Can't carry on without the token > like $tkn, qr/abc/; # (2) Useless carrying on if this fails. One thing I've done is defer the plan until I can ensure the basic prerequesites for the test is

Re: Conditional tests - SKIP, die, BAILOUT

2011-03-29 Thread Michael Ludwig
Andrew Moore schrieb am 29.03.2011 um 15:51 (-0500): > On Tue, Mar 29, 2011 at 3:46 PM, Michael Ludwig wrote: > > In a test script, tests may build up intermediate results which > > later tests depend upon. Imagine the following interacts with a web > > service so if something fails you don't want

Re: Conditional tests - SKIP, die, BAILOUT

2011-03-29 Thread Andrew Moore
On Tue, Mar 29, 2011 at 3:46 PM, Michael Ludwig wrote: > In a test script, tests may build up intermediate results which later > tests depend upon. Imagine the following interacts with a web service > so if something fails you don't want to waste time making network calls > to execute stuff which

Conditional tests - SKIP, die, BAILOUT

2011-03-29 Thread Michael Ludwig
In a test script, tests may build up intermediate results which later tests depend upon. Imagine the following interacts with a web service so if something fails you don't want to waste time making network calls to execute stuff which will fail anyway. \,,,/ (o o) --oOOo-(_