X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F31-array.t;h=b5ff1ede5d542aca4a3071cb965dc1a9ac81299e;hb=6a204757f3b9c5d10bc57e21cbb65c0e29688066;hp=cf1ac0bfde5f3372a39c755b80e85c064fd1174a;hpb=fa610aaeffe7ea7bcfdcac659811a64dc0fde6af;p=perl%2Fmodules%2FVariable-Magic.git diff --git a/t/31-array.t b/t/31-array.t index cf1ac0b..b5ff1ed 100644 --- a/t/31-array.t +++ b/t/31-array.t @@ -5,7 +5,7 @@ use warnings; use Test::More tests => 2 * 27 + 13 + 1; -use Variable::Magic qw/cast dispell VMG_COMPAT_ARRAY_PUSH_NOLEN VMG_COMPAT_ARRAY_UNSHIFT_NOLEN_VOID VMG_COMPAT_ARRAY_UNDEF_CLEAR/; +use Variable::Magic qw/cast dispell VMG_COMPAT_ARRAY_PUSH_NOLEN VMG_COMPAT_ARRAY_PUSH_NOLEN_VOID VMG_COMPAT_ARRAY_UNSHIFT_NOLEN_VOID VMG_COMPAT_ARRAY_UNDEF_CLEAR/; use lib 't/lib'; use Variable::Magic::TestWatcher; @@ -53,10 +53,12 @@ watch { $b = $#a } { len => 1 }, 'length $#'; is $b, 2, 'array: length $# correctly'; watch { push @a, 'x'; () } - { set => 1, (len => 1) x !VMG_COMPAT_ARRAY_PUSH_NOLEN },'push (void)'; + { set => 1, (len => 1) x !VMG_COMPAT_ARRAY_PUSH_NOLEN_VOID }, + 'push (void)'; $b = watch { push @a, 'y' } - { set => 1, (len => 1) x !VMG_COMPAT_ARRAY_PUSH_NOLEN }, 'push (scalar)'; + { set => 1, (len => 1) x !VMG_COMPAT_ARRAY_PUSH_NOLEN }, + 'push (scalar)'; is $b, 5, 'array: push (scalar) correctly'; $b = watch { pop @a } { set => 1, len => 1 }, 'pop';