X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FLexical-Types.git;a=blobdiff_plain;f=t%2F23-magic-uvar.t;h=e1d764d980bb5d1ace9b0e9efb160f411f151464;hp=1e24d25d2ab48660a0325e4c80473855b36de0d0;hb=edb71e7af0ed10c8b114f0aaab25ff1b20d4d99e;hpb=5c21bf6de3e2527b0fe556b5d67d785f1d686a8d diff --git a/t/23-magic-uvar.t b/t/23-magic-uvar.t index 1e24d25..e1d764d 100644 --- a/t/23-magic-uvar.t +++ b/t/23-magic-uvar.t @@ -5,15 +5,19 @@ use warnings; use Test::More; +use lib 't/lib'; +use VPIT::TestHelpers; + BEGIN { - plan skip_all => 'Variable::Magic 0.08 on 5.10 required to test uvar magic' - unless eval "use Variable::Magic 0.08; Variable::Magic::VMG_UVAR"; + load_or_skip('Variable::Magic', '0.35', [ ], 'required to test uvar magic'); + plan skip_all => 'perl 5.10 required to test uvar magic' + unless Variable::Magic::VMG_UVAR(); } { package Lexical::Types::Test::Ref; - use Variable::Magic qw/wizard cast/; + use Variable::Magic qw; our $wiz; BEGIN { @@ -34,7 +38,6 @@ BEGIN { BEGIN { plan tests => 2 * 11; - defined and diag "Using Variable::Magic $_" for $Variable::Magic::VERSION; } use Lexical::Types as => 'Lexical::Types::Test'; @@ -45,7 +48,8 @@ sub check (&$$;$) { my $want = wantarray; my @ret; { - local @{$got}{qw/fetch store/}; delete @{$got}{qw/fetch store/}; + local @{$got}{qw}; + delete @{$got}{qw}; if ($want) { @ret = eval { $test->() }; } elsif (defined $want) { @@ -53,6 +57,7 @@ sub check (&$$;$) { } else { eval { $test->() }; } + local $Test::Builder::Level = $Test::Builder::Level + 1; is_deeply $got, $exp, $desc; } return $want ? @ret : $ret[0];