summaryrefslogtreecommitdiff
path: root/t/op/avhv.t
diff options
context:
space:
mode:
Diffstat (limited to 't/op/avhv.t')
-rwxr-xr-xt/op/avhv.t23
1 files changed, 22 insertions, 1 deletions
diff --git a/t/op/avhv.t b/t/op/avhv.t
index 92afa37d37..23f9c69c8c 100755
--- a/t/op/avhv.t
+++ b/t/op/avhv.t
@@ -17,7 +17,7 @@ sub STORESIZE { $#{$_[0]} = $_[1]+1 }
package main;
-print "1..15\n";
+print "1..20\n";
$sch = {
'abc' => 1,
@@ -118,3 +118,24 @@ print "not " unless exists $avhv->{pants};
print "ok 14\n";
print "not " if exists $avhv->{bar};
print "ok 15\n";
+
+$avhv->{bar} = 10;
+print "not " unless exists $avhv->{bar} and $avhv->{bar} == 10;
+print "ok 16\n";
+
+$v = delete $avhv->{bar};
+print "not " unless $v == 10;
+print "ok 17\n";
+
+print "not " if exists $avhv->{bar};
+print "ok 18\n";
+
+$avhv->{foo} = 'xxx';
+$avhv->{bar} = 'yyy';
+$avhv->{pants} = 'zzz';
+@x = delete @{$avhv}{'foo','pants'};
+print "# @x\nnot " unless "@x" eq "xxx zzz";
+print "ok 19\n";
+
+print "not " unless "$avhv->{bar}" eq "yyy";
+print "ok 20\n";