use strict;
use warnings;
-use Test::Leaner tests => 21 + 2 + 1;
+BEGIN { delete $ENV{PERL_TEST_LEANER_USES_TEST_MORE} }
+
+use Test::Leaner tests => 21 + 2 + 1 + 2;
my $lacunary = [ [ 1, 2, 3 ] => [ 1, 2, 3 ] ];
delete $lacunary->[0]->[1];
for my $t (@tests) {
is_deeply $t->[0], $t->[1];
}
+
+# Test vivification of deleted elements of an array
+
+{
+ my @l = (1);
+ $l[2] = 3;
+ is_deeply \@l, [ 1, undef, 3 ];
+ delete $l[2];
+ is_deeply \@l, [ 1 ];
+}