Skip to content

Commit

Permalink
[t/spec] test for RT #61868 (slicing with empty range)
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.pugscode.org/pugs@24771 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information
moritz committed Jan 5, 2009
1 parent 297e783 commit 75e6aa7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion S09-subscript_slice/slice.t
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Testing array slices.
=end pod

plan 24;
plan 25;

{ my @array = (3,7,9,11);

Expand Down Expand Up @@ -93,3 +93,10 @@ plan 24;
is((3,7,9), [@array[(0,1,1)>>+<<(0,0,1)]], "calculated slice: hyperop");
}


# slices with empty ranges
{
my @array = 1, 2, 3;
my @other = @array[2..1];
is +@other, 0, '@array[2..1] is an empty slice';
}

0 comments on commit 75e6aa7

Please sign in to comment.