X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F31-array.t;h=3613dba460618f33ac1e085e713c065c67c54b47;hb=b34eec5b227be170f3cf8efdb8aaae400370960b;hp=20ab356034198e2baadf081b6832fb5ed9c71faa;hpb=e7d06d42b01cc371aabcd4cee7ef786059ed7a1b;p=perl%2Fmodules%2FVariable-Magic.git diff --git a/t/31-array.t b/t/31-array.t index 20ab356..3613dba 100644 --- a/t/31-array.t +++ b/t/31-array.t @@ -57,7 +57,7 @@ is $b, 3, 'array: length @ correctly'; watch { $b = $#a } { len => 1 }, 'length $#'; is $b, 2, 'array: length $# correctly'; -watch { push @a, 'x'; () } +watch { push @a, 'x'; () } # push looks at the static context { set => 1, (len => 1) x !VMG_COMPAT_ARRAY_PUSH_NOLEN_VOID }, 'push (void)'; @@ -69,7 +69,7 @@ is $b, 5, 'array: push (scalar) correctly'; $b = watch { pop @a } { set => 1, len => 1 }, 'pop'; is $b, 'y', 'array: pop correctly'; -watch { unshift @a, 'z'; () } +watch { unshift @a, 'z'; () } # unshift looks at the static context { set => 1, (len => 1) x !VMG_COMPAT_ARRAY_UNSHIFT_NOLEN_VOID }, 'unshift (void)'; @@ -79,7 +79,7 @@ is $b, 6, 'unshift (scalar) correctly'; $b = watch { shift @a } { set => 1, len => 1 }, 'shift'; is $b, 't', 'array: shift correctly'; -watch { my $i; @a = map ++$i, @a; () } { set => 5, len => 1, clear => 1}, 'map'; +watch { my $i; @a = map ++$i, @a } { set => 5, len => 1, clear => 1}, 'map'; @b = watch { grep { $_ >= 4 } @a } { len => 1 }, 'grep'; is_deeply \@b, [ 4 .. 5 ], 'array: grep correctly';