Skip to content

Commit

Permalink
Fudge splice.t for rakudo
Browse files Browse the repository at this point in the history
  • Loading branch information
Tadeusz Sośnierz committed Nov 2, 2011
1 parent 1947757 commit cbcca7c
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions S32-array/splice.t
Expand Up @@ -109,14 +109,18 @@ sub indirect_slurpy_context( *@got ) { @got };

# splice4 gets "CxtItem _" or "CxtArray _" instead of "CxtSlurpy _"
my @tmp = (1..10);
@a = splice @tmp, 5, 3;
@a = indirect_slurpy_context( @a );
@tmp = (1..10);
@b = indirect_slurpy_context( splice @tmp, 5, 3 );
is( @b, @a, "Calling splice with immediate and indirect context returns consistent results");
is( @a, [6,7,8], "Explicit call/assignment gives the expected results");
is( @b, [6,7,8], "Implicit context gives the expected results"); # this is due to the method-fallback bug
#?rakudo skip "infinite recursion bug"
{
@a = splice @tmp, 5, 3;
@a = indirect_slurpy_context( @a );
@tmp = (1..10);
@b = indirect_slurpy_context( splice @tmp, 5, 3 );
is( @b, @a, "Calling splice with immediate and indirect context returns consistent results");
is( @a, [6,7,8], "Explicit call/assignment gives the expected results");
is( @b, [6,7,8], "Implicit context gives the expected results"); # this is due to the method-fallback bug
}

#?rakudo skip "item() NYI"
{
@tmp = (1..10);
@a = item splice @tmp, 5, 3;
Expand Down

0 comments on commit cbcca7c

Please sign in to comment.