Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added tests for PR 260/RT#66776
  • Loading branch information
peschwa committed Jun 16, 2014
1 parent db4bad3 commit d6b8fac
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions S32-exceptions/misc.t
Expand Up @@ -487,6 +487,14 @@ throws_like 'my class A { method b { Q<b> } }; my $a = A.new; my $b = &A::b.assu
throws_like 'sub f { f(|$) }', X::Obsolete,
old => { m/'$) variable'/ }, replacement => { m/'$*EGID'/ }, when => { m/'in Perl 6'/ };

throws_like 'for 1,2,3, { say 3 }', X::Comp::Group,
sorrows => sub (@s) { @s[0] ~~ X::Syntax::BlockTaken && @s[0].message ~~ /^Expression/ },
panic => sub ($p) { $p ~~ X::Syntax::Missing && $p.what ~~ /^block/ };

throws_like 'CATCH { when X::Y {} }', X::Comp::Group,
sorrows => sub (@s) { @s[0] ~~ X::Syntax::BlockTaken && @s[0].what ~~ /'X::Y'/ },
panic => sub ($p) { $p ~~ X::Syntax::Missing && $p.what ~~ /^block/ };

done;

# vim: ft=perl6

0 comments on commit d6b8fac

Please sign in to comment.