Skip to content

Commit

Permalink
Add test for RT #116695
Browse files Browse the repository at this point in the history
  • Loading branch information
usev6 committed Oct 9, 2014
1 parent 6e02af8 commit f386c96
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions S32-array/delete.t
@@ -1,7 +1,7 @@
use v6;
use Test;

plan 29;
plan 30;

=begin description
Expand Down Expand Up @@ -75,7 +75,6 @@ sub make-string(@a) {
@array[8] = 'eight';
@array[8]:delete;
is +@array, 0, 'deletion of trailing items purge empty positions';

}

# W/ one range of positive indices
Expand Down Expand Up @@ -111,6 +110,16 @@ sub make-string(@a) {
lives_ok { map { 1 }, @array }, 'map @array lives after delete';
}

# RT #116695
{
my @array;
@array[0] = Any;
@array[2] = 'two';
@array[2]:delete;
is @array.elems, 1,
'deletion of trailing item does not purge elements we assigned to';
}

# TODO More exclusive bounds checks

# TODO W/ multiple ranges
Expand Down

0 comments on commit f386c96

Please sign in to comment.