X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F32-hash.t;fp=t%2F32-hash.t;h=4686d27dbdaa75547a71594e692bb92392946990;hb=997fe5643a5c203315ff26f4e4bf7840fb33a9d8;hp=d04c366a3a1688f38baa4eff3ff307291a8941c1;hpb=8c49e5b8fe531ebdf14f14288ad05a68b49f4a79;p=perl%2Fmodules%2FVariable-Magic.git diff --git a/t/32-hash.t b/t/32-hash.t index d04c366..4686d27 100644 --- a/t/32-hash.t +++ b/t/32-hash.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 2 * 18 + 5 + 1; +use Test::More tests => 2 * 19 + 5 + 1; use Variable::Magic qw/cast dispell MGf_COPY VMG_UVAR/; @@ -37,6 +37,8 @@ check { @b = @h{qw/bar qux/} } # (copy => 2) x MGf_COPY # if clear magic is_deeply \@b, [ @n{qw/bar qux/} ], 'hash: slice correctly'; +check { %h = () } { }, 'empty in list context'; # clear => 1 + check { %h = (a => 1, d => 3); () } +{ (store => 2) x VMG_UVAR }, # clear => 1, (copy => 2) x VMG_UVAR