X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F20-get.t;h=3411417dfb57116f9b05a63e8cbf219efd840f13;hb=HEAD;hp=7548e15e20adfef567fac84fa407063e64755b00;hpb=da422089a9a5dfbf84e72ec3ba867063471ff41c;p=perl%2Fmodules%2FVariable-Magic.git diff --git a/t/20-get.t b/t/20-get.t index 7548e15..3411417 100644 --- a/t/20-get.t +++ b/t/20-get.t @@ -3,12 +3,13 @@ use strict; use warnings; -use Test::More tests => 2 * 4 + 2 + 1; +use Test::More tests => (2 * 4 + 2) + (2 * 2) + 1; -use Variable::Magic qw/cast/; +use Variable::Magic qw; use lib 't/lib'; use Variable::Magic::TestWatcher; +use Variable::Magic::TestValue; my $wiz = init_watcher 'get', 'get'; @@ -24,3 +25,11 @@ is $b, $n, 'get: assign to correctly'; $b = watch { "X${a}Y" } { get => 1 }, 'interpolate'; is $b, "X${n}Y", 'get: interpolate correctly'; + +{ + my $val = 0; + + init_value $val, 'get', 'get'; + + value { my $x = $val } \0; +}