]> git.vpit.fr Git - perl/modules/Scalar-Vec-Util.git/blobdiff - t/02-pp.t
Restyle tests
[perl/modules/Scalar-Vec-Util.git] / t / 02-pp.t
index 92ee0c865a27691ea90b9aee4d80ba9cf0c20d64..35e3d85c595bddfa2c84433c451edab46856ef6b 100644 (file)
--- 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<vfill vcopy veq SVU_PP>;
 
-is(SVU_PP, 1, 'using pure perl subroutines');
-for (qw/vfill vcopy veq/) {
+is SVU_PP, 1, 'using pure perl subroutines';
+for (qw<vfill vcopy veq>) {
  no strict 'refs';
- is(*{$_}{CODE}, *{'Scalar::Vec::Util::'.$_}{CODE}, $_ .' is ' . $_ . '_pp');
+ is *{$_}{CODE}, *{'Scalar::Vec::Util::'.$_}{CODE}, $_ .' is ' . $_ . '_pp';
 }