X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F32-hash.t;h=572f5e668e42fe18033cd0765ba7e4ef652bc152;hb=9e65e9bfbd5fa2ee747e865d1471b26ec229383c;hp=54c23d8dc406841a989da2713c095854c826668f;hpb=763ba8093427f3668368fa885741618ac6289d41;p=perl%2Fmodules%2FVariable-Magic.git diff --git a/t/32-hash.t b/t/32-hash.t index 54c23d8..572f5e6 100644 --- a/t/32-hash.t +++ b/t/32-hash.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 17; +use Test::More tests => 18; use Variable::Magic qw/wizard cast dispell MGf_COPY VMG_UVAR/; @@ -54,11 +54,17 @@ $x[5] += 2 if MGf_COPY; $x[8] += 2 if VMG_UVAR; ok(check(), 'hash : slice'); +%a = (a => 1, d => 3); +++$x[3]; +$x[5] += 2 if VMG_UVAR; +$x[9] += 2 if VMG_UVAR; +ok(check(), 'hash : assign from list'); + %a = map { $_ => 1 } qw/a b d/; ++$x[3]; -$x[5] += 3 if MGf_COPY && $^V && $^V gt 5.9.3; +$x[5] += 3 if VMG_UVAR; $x[9] += 3 if VMG_UVAR; -ok(check(), 'hash : assign'); +ok(check(), 'hash : assign from map'); $a{d} = 2; ++$x[5] if MGf_COPY;