Skip to content

Commit

Permalink
[t/spec] tests for RT #75118, named arguments to return()
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.pugscode.org/pugs@30644 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information
moritz committed May 15, 2010
1 parent 9a3f7de commit 3aac6a6
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion S06-advanced_subroutine_features/return.t
Expand Up @@ -15,7 +15,7 @@ See also t/blocks/return.t, which overlaps in scope.
# reference for the spec for 'return', but I couldn't find
# one either.

plan 73;
plan 76;

# These test the returning of values from a subroutine.
# We test each data-type with 4 different styles of return.
Expand Down Expand Up @@ -300,6 +300,17 @@ is Foo.new.officialsubmeth(), 43,
is Foo::official(), 44,
"return correctly from official sub only";

# RT #75118
{
sub named() {
return 1, 2, :c(3);
}
is named().elems, 3, 'return with named arguments';
is named().[2].key, 'c', ' ... correct key';
#?rakudo todo 'named argument to return()'
is named().[2].value, '3', ' ... correct value';
}

# RT #61732
{
sub rt61732_c { 1; CATCH {} }
Expand Down

0 comments on commit 3aac6a6

Please sign in to comment.