use warnings;
use lib 't/lib';
+use VPIT::TestHelpers;
use indirect::TestThreads;
use Test::Leaner tests => 1;
-sub run_perl {
- my $code = shift;
-
- my ($SystemRoot, $PATH) = @ENV{qw<SystemRoot PATH>};
- local %ENV;
- $ENV{SystemRoot} = $SystemRoot if $^O eq 'MSWin32' and defined $SystemRoot;
- $ENV{PATH} = $PATH if $^O eq 'cygwin' and defined $PATH;
-
- system { $^X } $^X, '-T', map("-I$_", @INC), '-e', $code;
-}
-
SKIP:
{
skip 'Fails on 5.8.2 and lower' => 1 if "$]" <= 5.008_002;
BEGIN { delete $ENV{PERL_INDIRECT_PM_DISABLE} }
-sub run_perl {
- my $code = shift;
-
- my ($SystemRoot, $PATH) = @ENV{qw<SystemRoot PATH>};
- local %ENV;
- $ENV{SystemRoot} = $SystemRoot if $^O eq 'MSWin32' and defined $SystemRoot;
- $ENV{PATH} = $PATH if $^O eq 'cygwin' and defined $PATH;
-
- system { $^X } $^X, '-T', map("-I$_", @INC), '-e', $code;
-}
-
{
my $status = run_perl 'no indirect; qq{a\x{100}b} =~ /\A[\x00-\x7f]*\z/;';
is $status, 0, 'RT #47866';
use strict;
use warnings;
+use Config ();
+
my %exports = (
load_or_skip => \&load_or_skip,
load_or_skip_all => \&load_or_skip_all,
+ run_perl => \&run_perl,
skip_all => \&skip_all,
);
return $loaded;
}
+sub run_perl {
+ my $code = shift;
+
+ my ($SystemRoot, $PATH) = @ENV{qw<SystemRoot PATH>};
+ my $ld_name = $Config::Config{ldlibpthname};
+ my $ldlibpth = $ENV{$ld_name};
+
+ local %ENV;
+ $ENV{SystemRoot} = $SystemRoot if $^O eq 'MSWin32' and defined $SystemRoot;
+ $ENV{PATH} = $PATH if $^O eq 'cygwin' and defined $PATH;
+ $ENV{$ld_name} = $ldlibpth if $^O eq 'android' and defined $ldlibpth;
+
+ system { $^X } $^X, '-T', map("-I$_", @INC), '-e', $code;
+}
+
package VPIT::TestHelpers::Guard;
sub new {