]> git.vpit.fr Git - perl/modules/Variable-Magic.git/blobdiff - t/32-hash.t
Also test exists in t/32-hash.t
[perl/modules/Variable-Magic.git] / t / 32-hash.t
index c2697d54d0d0ad835ed2023627db8553bfaf4f93..164c6ed51091e97a18b9ad2e8f836fc8ff38f079 100644 (file)
@@ -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';