Re: tesing exceptions of Error.pm

2003-12-03 Thread Michael G Schwern
On Wed, Dec 03, 2003 at 10:20:03AM +, Fergal Daly wrote: > On Tue, Dec 02, 2003 at 10:05:46PM -0800, Michael G Schwern wrote: > > Why not? > > > > catch MyError with { > > like( $ex, qr/Bad thing/ ); > > }; > > If there is no exception then then that test won't execute. It

Re: tesing exceptions of Error.pm

2003-12-03 Thread Fergal Daly
On Tue, Dec 02, 2003 at 10:05:46PM -0800, Michael G Schwern wrote: > Why not? > > catch MyError with { > like( $ex, qr/Bad thing/ ); > }; If there is no exception then then that test won't execute. It'd have to be something like try { f(); fail("no excep

Re: tesing exceptions of Error.pm

2003-12-02 Thread Michael G Schwern
On Thu, Nov 27, 2003 at 10:02:10PM +0200, Gabor Szabo wrote: > How am I going to test this ? > I came up with the following in the test script: > > > use Error qw(:try); > > > my $ex; > try { >f(); > } > catch MyError with { > $ex = shift; > }; > like($ex, qr/Bad thing happened/, 'succe

Re: tesing exceptions of Error.pm

2003-11-28 Thread Andy Lester
lists many of them, but maybe a more comprehensive list would categorize them in 'test modules that use the Test::Builder framework', 'test report utils' (such as Test::Harness), 'mod_perl related tests', etc. Iain Truskett and I are working on such a list right now. Actually, he's done working

Re: tesing exceptions of Error.pm

2003-11-28 Thread Gabor Szabo
On Fri, 28 Nov 2003, Rafael Garcia-Suarez wrote: > Andy Lester wrote: > > > > > How am I going to test this ? > > > > Take a look at Test::Warn for warnings, and Test::Exception for errors. > > > > I think qa.perl.org needs a listing of Test::* modules so that people > > know what's available. > >

Re: tesing exceptions of Error.pm

2003-11-28 Thread Rafael Garcia-Suarez
Andy Lester wrote: > > > How am I going to test this ? > > Take a look at Test::Warn for warnings, and Test::Exception for errors. > > I think qa.perl.org needs a listing of Test::* modules so that people > know what's available. http://search.cpan.org/search?query=Test-&mode=dist lists many o

Re: tesing exceptions of Error.pm

2003-11-27 Thread Andy Lester
How am I going to test this ? Take a look at Test::Warn for warnings, and Test::Exception for errors. I think qa.perl.org needs a listing of Test::* modules so that people know what's available. xoa -- Andy Lester [EMAIL PROTECTED], AIM:petdance http://petdance.com/ http://use.perl.org/~petdanc