Skip to content

Commit 93081cd

Browse files
committed
Add test for program-level handlers.
In its own test file rather than catch.t, so as not to cause trouble debugging issues with catch.t tests.
1 parent 35714a7 commit 93081cd

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

S04-exception-handlers/top-level.t

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
use v6;
2+
3+
use Test;
4+
5+
plan 1;
6+
7+
sub foo { die };
8+
foo;
9+
10+
CATCH {
11+
when * {
12+
pass 'Top-level handler caught exception'
13+
}
14+
}

0 commit comments

Comments
 (0)