X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F16-huf.t;h=0f9215c689a217f38af86d135a516ae8ed3bc179;hb=82dde567fe6ace7774ceec15edeb513dc5f287e8;hp=da2e674eb8e90fc8a91d85744d65b7bb26ae7080;hpb=da422089a9a5dfbf84e72ec3ba867063471ff41c;p=perl%2Fmodules%2FVariable-Magic.git diff --git a/t/16-huf.t b/t/16-huf.t index da2e674..0f9215c 100644 --- a/t/16-huf.t +++ b/t/16-huf.t @@ -5,25 +5,22 @@ use warnings; use Test::More; -use Variable::Magic qw/wizard cast dispell VMG_UVAR/; +use Variable::Magic qw; -if (!VMG_UVAR) { - plan skip_all => 'No nice uvar magic for this perl'; -} +use lib 't/lib'; +use VPIT::TestHelpers; -eval "use Hash::Util::FieldHash"; -if ($@) { - plan skip_all => 'Hash::Util::FieldHash required for testing uvar interaction'; -} else { +if (VMG_UVAR) { + load_or_skip('Hash::Util::FieldHash', undef, [ ], + 'required for testing uvar interaction'); plan tests => 2 * 5 + 7 + 1; - my $v = $Hash::Util::FieldHash::VERSION; - diag "Using Hash::Util::FieldHash $v" if defined $v; +} else { + skip_all 'No nice uvar magic for this perl'; } -use lib 't/lib'; use Variable::Magic::TestWatcher; -my $wiz = init_watcher [ qw/fetch store/ ], 'huf'; +my $wiz = init_watcher [ qw ], 'huf'; ok defined($wiz), 'huf: wizard with uvar is defined'; is ref($wiz), 'SCALAR', 'huf: wizard with uvar is a scalar ref';