Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^3: Testing test function

by choroba (Chancellor)
on Sep 26, 2013 at 11:32 UTC ( #1055821=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Testing test function
in thread Testing test function

Untested: What about
ok(! eval { test_foo(a=>2) ; 1}, 'test_foo() should fail for a=2'); is($@, 'invalid argument', 'expected error');
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
Comment on Re^3: Testing test function
Download Code
Replies are listed 'Best First'.
Re^4: Testing test function
by sedusedan (Monk) on Sep 27, 2013 at 06:18 UTC
    I'm afraid that wouldn't work, because test_foo() emits TAP as well as uses the same Test::Builder instance (since it uses Test::More also) and will interfere with the test script.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1055821]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (9)
As of 2016-05-25 17:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?