X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F21-set.t;h=25535e26d026503e64c970e3a236b8cdcadd977d;hb=b9df7824d4619174e28f9b1b5856c4a228d9cc7b;hp=5ed992fe5577145a14b32aa4d788664308b77c4f;hpb=da422089a9a5dfbf84e72ec3ba867063471ff41c;p=perl%2Fmodules%2FVariable-Magic.git diff --git a/t/21-set.t b/t/21-set.t index 5ed992f..25535e2 100644 --- a/t/21-set.t +++ b/t/21-set.t @@ -3,12 +3,13 @@ use strict; use warnings; -use Test::More tests => 2 * 5 + 3 + 1; +use Test::More tests => (2 * 5 + 3) + (2 * 2 + 1); use Variable::Magic qw/cast/; use lib 't/lib'; use Variable::Magic::TestWatcher; +use Variable::Magic::TestValue; my $wiz = init_watcher 'set', 'set'; @@ -26,3 +27,11 @@ is $a, $n + 1, 'set: increment correctly'; watch { --$a } { set => 1 }, 'decrement'; is $a, $n, 'set: decrement correctly'; + +{ + my $val = 0; + + init_value $val, 'set', 'set'; + + value { $val = 1 } \1; +}