Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
test that stubby exception generators can take an argument
  • Loading branch information
moritz committed Mar 30, 2012
1 parent 6b41ab3 commit 903dffc
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions S32-exceptions/misc.t
Expand Up @@ -192,4 +192,17 @@ throws_like 'my sub a { POST 0 }; a()', X::Phaser::PrePost, phaser => 'POST', co
throws_like 'use fatal; my $x = "5 foo" + 8;', X::Str::Numeric, source => '5 foo', pos => 1,
reason => /trailing/;

# RT #58558
throws_like '!!! 42', X::AdHoc, payload => 42;
throws_like 'use fatal; ... 42', X::AdHoc, payload => 42;
{
my $c = 0;
try {
??? 42;
CONTROL { default { $c++ } }
}
is $c, 1, '??? with argument warns';
}


done;

0 comments on commit 903dffc

Please sign in to comment.