X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F34-glob.t;fp=t%2F34-glob.t;h=a6f26375ba343bf662b426bb0a19cd7f75c85b29;hb=442d92f66e46ee6b39285eec14de33419f2854c9;hp=de5c64cdf16ed408e3be995775656dfbf860f9e8;hpb=60b0398efa6ae2abc98119e82678ae7b33bdca75;p=perl%2Fmodules%2FVariable-Magic.git diff --git a/t/34-glob.t b/t/34-glob.t index de5c64c..a6f2637 100644 --- a/t/34-glob.t +++ b/t/34-glob.t @@ -9,7 +9,7 @@ eval "use Symbol qw/gensym/"; if ($@) { plan skip_all => "Symbol::gensym required for testing magic for globs"; } else { - plan tests => 2 * 8 + 1; + plan tests => 2 * 12 + 1; diag "Using Symbol $Symbol::VERSION" if defined $Symbol::VERSION; } @@ -30,7 +30,12 @@ watch { cast *a, $wiz } +{ }, 'cast'; watch { local *b = *a } +{ %get }, 'assign to'; -watch { *a = gensym() } +{ %get, set => 1 }, 'assign'; +watch { *a = \1 } +{ %get, set => 1 }, 'assign scalar slot'; +watch { *a = [ qw/x y/ ] } +{ %get, set => 1 }, 'assign array slot'; +watch { *a = { u => 1 } } +{ %get, set => 1 }, 'assign hash slot'; +watch { *a = sub { } } +{ %get, set => 1 }, 'assign code slot'; + +watch { *a = gensym() } +{ %get, set => 1 }, 'assign glob'; watch { local *b = gensym();