Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re^3: Testing test function

by choroba (Canon)
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?

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (6)
As of 2015-10-04 11:49 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (102 votes), past polls