Skip to content

Instantly share code, notes, and snippets.

@melezhik
Created September 1, 2016 11:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save melezhik/e8cd41e1e041fe613038ab31007c3216 to your computer and use it in GitHub Desktop.
Save melezhik/e8cd41e1e041fe613038ab31007c3216 to your computer and use it in GitHub Desktop.
catch-done-testing-inside2
melezhik@melezhik-pc:~/projects/outhentix-dsl$ cat catch-done-testing2.t
use v6;
use Test;
class Foo { method foo { die "upss" } }
ok 1, 'one';
Foo.new().foo;
CATCH { default { ok True, 'two'; done-testing; } }
melezhik@melezhik-pc:~/projects/outhentix-dsl$ prove --exec 'perl6' -v catch-done-testing2.t
catch-done-testing2.t ..
ok 1 - one
ok 2 - two
1..2
ok
All tests successful.
Files=1, Tests=2, 0 wallclock secs ( 0.02 usr 0.00 sys + 0.23 cusr 0.03 csys = 0.28 CPU)
Result: PASS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment