Permalink
Browse files

Tests for RT #71366

  • Loading branch information...
1 parent 20f0418 commit 1833aa57a949e6a734a47946389e8353d3c3818c @patrickas patrickas committed Mar 6, 2011
Showing with 17 additions and 1 deletion.
  1. +17 −1 S06-other/main-usage.t
View
@@ -1,7 +1,7 @@
use v6;
use Test;
-plan 11;
+plan 13;
BEGIN { @*INC.push: 't/spec/packages' }
@@ -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.