From: Vincent Pit Date: Fri, 23 Jan 2009 00:27:27 +0000 (+0100) Subject: Also test exists in t/32-hash.t X-Git-Tag: v0.28~10 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;ds=sidebyside;h=2aeba77195a5533f86ad063f8e61c1d698c2f830;p=perl%2Fmodules%2FVariable-Magic.git Also test exists in t/32-hash.t --- diff --git a/t/32-hash.t b/t/32-hash.t index c2697d5..164c6ed 100644 --- a/t/32-hash.t +++ b/t/32-hash.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 2 * 19 + 5 + 1; +use Test::More tests => 2 * 20 + 6 + 1; use Variable::Magic qw/cast dispell MGf_COPY VMG_UVAR/; @@ -25,6 +25,9 @@ check { $s = $h{foo} } +{ (fetch => 1) x VMG_UVAR }, 'assign element to'; is $s, $n{foo}, 'hash: assign element to correctly'; +$s = check { exists $h{foo} } +{ (exists => 1) x VMG_UVAR }, 'exists'; +ok $s, 'hash: exists correctly'; + my %b; check { %b = %h } { }, 'assign to'; is_deeply \%b, \%n, 'hash: assign to correctly';