From: Vincent Pit Date: Fri, 2 Nov 2012 01:42:11 +0000 (-0200) Subject: Port module loading in magic tests to VPIT::TestHelpers X-Git-Tag: v0.13~31 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FLexical-Types.git;a=commitdiff_plain;h=edb71e7af0ed10c8b114f0aaab25ff1b20d4d99e Port module loading in magic tests to VPIT::TestHelpers --- diff --git a/t/22-magic.t b/t/22-magic.t index d0cae1b..cc8e497 100644 --- a/t/22-magic.t +++ b/t/22-magic.t @@ -5,9 +5,11 @@ use warnings; use Test::More; +use lib 't/lib'; +use VPIT::TestHelpers; + BEGIN { - plan skip_all => 'Variable::Magic required to test magic' - unless eval "use Variable::Magic; 1"; + load_or_skip('Variable::Magic', undef, [ ], 'required to test magic'); } { @@ -29,7 +31,6 @@ BEGIN { BEGIN { plan tests => 2 * 8; - defined and diag "Using Variable::Magic $_" for $Variable::Magic::VERSION; } use Lexical::Types as => 'Lexical::Types::Test'; diff --git a/t/23-magic-uvar.t b/t/23-magic-uvar.t index ce80f2e..e1d764d 100644 --- a/t/23-magic-uvar.t +++ b/t/23-magic-uvar.t @@ -5,9 +5,13 @@ use warnings; use Test::More; +use lib 't/lib'; +use VPIT::TestHelpers; + BEGIN { - plan skip_all => 'Variable::Magic 0.35 on 5.10 required to test uvar magic' - unless eval "use Variable::Magic 0.35; 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(); } { @@ -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';