Skip to content

Commit

Permalink
test that MAIN + unexpected named args trigger USAGE message
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Jul 30, 2012
1 parent f0f43c4 commit 9ca79dd
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion S06-other/main-usage.t
@@ -1,7 +1,7 @@
use v6;
use Test;

plan 19;
plan 20;

BEGIN { @*INC.push: 't/spec/packages' }

Expand Down Expand Up @@ -159,3 +159,10 @@ is_run 'multi MAIN($) { print q[Any] }; multi MAIN(Str) { print q[Str] }',
out => 'Str',
},
'best multi matches (not just first one)';

is_run 'sub MAIN() { print 42 }', :args['--foo'],
{
out => '',
err => rx:i/usage/,
},
'superfluous options trigger usage message';

0 comments on commit 9ca79dd

Please sign in to comment.