summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/perl/t/op/delete.t
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/usr.bin/perl/t/op/delete.t')
-rw-r--r--gnu/usr.bin/perl/t/op/delete.t10
1 files changed, 9 insertions, 1 deletions
diff --git a/gnu/usr.bin/perl/t/op/delete.t b/gnu/usr.bin/perl/t/op/delete.t
index 10a218b1b61..53212a11407 100644
--- a/gnu/usr.bin/perl/t/op/delete.t
+++ b/gnu/usr.bin/perl/t/op/delete.t
@@ -1,6 +1,6 @@
#!./perl
-print "1..36\n";
+print "1..37\n";
# delete() on hash elements
@@ -121,3 +121,11 @@ print @{$refary[0]} == 1 ? "ok 35\n" : "not ok 35 @list\n";
print "not " unless $a == $b && $b == $c;
print "ok 36\n";
}
+
+{
+ # [perl #29127] scalar delete of empty slice returned garbage
+ my %h;
+ my ($x,$y) = (1, scalar delete @h{()});
+ print "not " if defined $y;
+ print "ok 37\n";
+}