]> git.vpit.fr Git - perl/modules/Variable-Magic.git/blobdiff - t/17-ctl.t
Use run_perl() from VPIT::TestHelpers
[perl/modules/Variable-Magic.git] / t / 17-ctl.t
index 19dd8649f41aef264fed2a4874ef48bdbc682a84..c9dd4ca6426c7149d400e3550689c5156756fcd8 100644 (file)
@@ -5,6 +5,9 @@ use warnings;
 
 use Test::More tests => 4 * 8 + 4 * (2 * 6 + 1) + 10 + 1 + 1;
 
+use lib 't/lib';
+use VPIT::TestHelpers;
+
 use Variable::Magic qw<wizard cast VMG_UVAR>;
 
 sub expect {
@@ -342,17 +345,6 @@ eval q{BEGIN {
 like $@, expect('tomato', undef, "\nBEGIN.*"),
                           'die in BEGIN in eval triggers hints hash destructor';
 
-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 $has_capture_tiny = do {
  local $@;
  eval {