X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F02-pp.t;h=0e418421e36833d95602c5c03e86c4605a45ad59;hb=0f9ca88734df707e9f1d70a8067e6502b96820a9;hp=92ee0c865a27691ea90b9aee4d80ba9cf0c20d64;hpb=f77706f0734eb34a9623cc492b5d73061fba9b62;p=perl%2Fmodules%2FScalar-Vec-Util.git diff --git a/t/02-pp.t b/t/02-pp.t index 92ee0c8..0e41842 100644 --- a/t/02-pp.t +++ b/t/02-pp.t @@ -3,13 +3,24 @@ use strict; use warnings; +use Config qw<%Config>; + use Test::More tests => 4; -BEGIN { @INC = grep !/arch$/, @INC } -use Scalar::Vec::Util qw/vfill vcopy veq SVU_PP/; +BEGIN { + require XSLoader; + my $xsloader_load_orig = \&XSLoader::load; + no warnings 'redefine'; + *XSLoader::load = sub { + die if $_[0] eq 'Scalar::Vec::Util'; + goto $xsloader_load_orig; + }; +} + +use Scalar::Vec::Util qw; is(SVU_PP, 1, 'using pure perl subroutines'); -for (qw/vfill vcopy veq/) { +for (qw) { no strict 'refs'; is(*{$_}{CODE}, *{'Scalar::Vec::Util::'.$_}{CODE}, $_ .' is ' . $_ . '_pp'); }