summaryrefslogtreecommitdiff
path: root/dist/base
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-06-04 11:58:14 -0700
committerFather Chrysostomos <sprout@cpan.org>2011-06-04 14:34:30 -0700
commitfb2352ebbcdd380053ad8408a0613965b0ec2950 (patch)
tree97471c28069315b6940886ea3aa2a9355ec2bd43 /dist/base
parente5accad2c334d0d98a2eb0bcfa8f8363dfc3c78a (diff)
downloadperl-fb2352ebbcdd380053ad8408a0613965b0ec2950.tar.gz
Allow restricted hashes containing COWs to be cleared
Diffstat (limited to 'dist/base')
-rw-r--r--dist/base/t/fields.t6
1 files changed, 4 insertions, 2 deletions
diff --git a/dist/base/t/fields.t b/dist/base/t/fields.t
index a3493ce2ee..d5f23b61d7 100644
--- a/dist/base/t/fields.t
+++ b/dist/base/t/fields.t
@@ -6,7 +6,7 @@ BEGIN {
}
use strict;
-use Test::More tests => 17;
+use Test::More tests => 18;
BEGIN { use_ok('fields'); }
@@ -108,8 +108,10 @@ package main;
ok(exists $x->{b}, 'x has b');
SKIP: {
- skip "This test triggers a perl bug", 1 if $] < 5.014001;
+ skip "These tests trigger a perl bug", 1 if $] < 5.014001;
$x->{a} = __PACKAGE__;
ok eval { delete $x->{a}; 1 }, 'deleting COW values';
+ $x->{a} = __PACKAGE__;
+ ok eval { %$x = (); 1 }, 'clearing a restr hash containing COWs';
}
}