X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F30-scalar.t;h=bdad8ed19463b17f6673edb2f1aad53bf3e11db3;hb=751094f5d7b43171afc7104e957ca7fe2d21eb34;hp=3733ab72ba7e7db7d5d8093904ff3f3e46cc607c;hpb=77a84f75f33e3ee44e61182dec76699e23025375;p=perl%2Fmodules%2FVariable-Magic.git diff --git a/t/30-scalar.t b/t/30-scalar.t index 3733ab7..bdad8ed 100644 --- a/t/30-scalar.t +++ b/t/30-scalar.t @@ -1,14 +1,17 @@ #!perl -T +use strict; +use warnings; + use Test::More tests => 13; use Variable::Magic qw/wizard cast dispell/; -my @c = (0) x 5; -my @x = (0) x 5; +my @c = (0) x 12; +my @x = (0) x 12; sub check { - for (0 .. 4) { return 0 unless $c[$_] == $x[$_]; } + for (0 .. 11) { return 0 unless $c[$_] == $x[$_]; } return 1; } @@ -17,7 +20,14 @@ my $wiz = wizard get => sub { ++$c[0] }, set => sub { ++$c[1] }, len => sub { ++$c[2] }, clear => sub { ++$c[3] }, - free => sub { ++$c[4] }; + free => sub { ++$c[4] }, + copy => sub { ++$c[5] }, + dup => sub { ++$c[6] }, + local => sub { ++$c[7] }, + fetch => sub { ++$c[8] }, + store => sub { ++$c[9] }, + 'exists' => sub { ++$c[10] }, + 'delete' => sub { ++$c[11] }; ok(check(), 'scalar : create wizard'); my $n = int rand 1000;