Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Tests for RT #71366
  • Loading branch information
patrickas committed Mar 6, 2011
1 parent 20f0418 commit 1833aa5
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion S06-other/main-usage.t
@@ -1,7 +1,7 @@
use v6;
use Test;

plan 11;
plan 13;

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

Expand Down Expand Up @@ -84,3 +84,19 @@ is_run 'sub MAIN(:xen(:$x)) { print $x }',
},
:args['-x', '23'],
'short option with spacey value';

# RT #71366
is_run 'sub MAIN($a, :$var) { say "a: $a, optional: $var"; }',
{
err => /\-\-var/,
out => '',
},
:args['param', '--var'],
'Non Bool option last with no value';

is_run 'sub MAIN($a, Bool :$var) { say "a: $a, optional: $var"; }',
{
out => "a: param, optional: Bool::True\n",
},
:args['param', '--var'],
'Bool option last with no value';

0 comments on commit 1833aa5

Please sign in to comment.