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-(_

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

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 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
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 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 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: Conditional tests - SKIP, die, BAILOUT

2011-03-30 Thread Ovid
> From: Jozef Kutej > To: perl-qa@perl.org > Sent: Wed, 30 March, 2011 7:54:21 > Subject: Re: Conditional tests - SKIP, die, BAILOUT > > On 2011-03-29 23:05, Michael Ludwig wrote: > >> Perhaps the 'bail_on_fail' or &#

Re: Conditional tests - SKIP, die, BAILOUT

2011-03-30 Thread Buddy Burden
On Wed, Mar 30, 2011 at 5:58 AM, Ovid wrote: > >> From: Jozef Kutej >> To: perl-qa@perl.org >> Sent: Wed, 30 March, 2011 7:54:21 >> Subject: Re: Conditional tests - SKIP, die, BAILOUT >> : >> : >> perl -le 'use Te

Re: Conditional tests - SKIP, die, BAILOUT

2011-03-30 Thread Michael Ludwig
Buddy Burden schrieb am 30.03.2011 um 11:25 (-0700): > On Wed, Mar 30, 2011 at 5:58 AM, Ovid wrote: > >> 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);' > Plus, with the "or die" approach, you can only mimic Test::Most's