diff options
Diffstat (limited to 't/op/array.t')
-rwxr-xr-x | t/op/array.t | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/t/op/array.t b/t/op/array.t index 6461a433bc..27565de702 100755 --- a/t/op/array.t +++ b/t/op/array.t @@ -7,7 +7,7 @@ BEGIN { require 'test.pl'; -plan (111); +plan (117); # # @foo, @bar, and @ary are also used from tie-stdarray after tie-ing them @@ -356,4 +356,32 @@ sub test_arylen { } } +{ + # Bug #37350 + my @array = (1..4); + $#{@array} = 7; + is ($#{4}, 7); + + my $x; + $#{$x} = 3; + is(scalar @$x, 4); + + push @{@array}, 23; + is ($4[8], 23); +} +{ + # Bug #37350 -- once more with a global + use vars '@array'; + @array = (1..4); + $#{@array} = 7; + is ($#{4}, 7); + + my $x; + $#{$x} = 3; + is(scalar @$x, 4); + + push @{@array}, 23; + is ($4[8], 23); +} + "We're included by lib/Tie/Array/std.t so we need to return something true"; |