Skip to content

Commit

Permalink
Add a test for #127977
Browse files Browse the repository at this point in the history
  • Loading branch information
Tadeusz “tadzik” Sośnierz committed Apr 24, 2016
1 parent 95a5c18 commit 16338c5
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion S06-other/main-usage.t
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use v6;
use lib 't/spec/packages';

use Test;
plan 28;
plan 29;

use Test::Util;

Expand Down Expand Up @@ -233,3 +233,11 @@ is_run 'sub MAIN (Str $value) { print "String $value" }',
},
:args[10],
'passing an integer matches MAIN(Str)';

# RT #127977
is_run 'sub MAIN(*@arg where { False }) { }; sub USAGE { print "USAGE called" }',
{
out => 'USAGE called',
err => '',
},
"failed constraint check doesn't leak internal exception out to the user";

0 comments on commit 16338c5

Please sign in to comment.