Skip to content

Commit

Permalink
[t/spec] tests for mysub(:$named_arg)
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.pugscode.org/pugs@24975 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information
moritz committed Jan 20, 2009
1 parent 50c19b6 commit ebb8b24
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion S06-signature/named-parameters.t
@@ -1,7 +1,7 @@
use v6;
use Test;

plan 67;
plan 69;

# L<S06/Required parameters/"Passing a named argument that cannot be bound to
# a normal subroutine is also a fatal error.">
Expand Down Expand Up @@ -29,6 +29,10 @@ plan 67;
return $w;
}
is c(w => 3), 3, 'Named argument passes an integer, not a Pair';
my $x = 5;
#?rakudo 2 skip 'colonpair calling'
is c(:$x), 3, 'can use :$x colonpair syntax to call named arg';
eval_dies_ok 'my $y; c(:$y)', 'colonpair with wrong variable name dies';
}

# L<S06/Named parameters>
Expand Down

0 comments on commit ebb8b24

Please sign in to comment.