Skip to content

Commit 823b872

Browse files
haargbluefeet
authored andcommitted
test script using current perl
Instead of relying on the environment, call the script using the currently running perl. This also provides an easy way to add lib to the @inc path, rather than overriding PERL5LIB, which won't play nice with local::lib.
1 parent 7daf308 commit 823b872

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

t/gitlab-api-v4.t

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,8 @@ ok( 1, 'made it to the end' );
1717
done_testing;
1818

1919
sub run {
20-
local $ENV{PERL5LIB} = 'lib';
21-
2220
my($ok, $error, $full, $stdout, $stderr) =
23-
IPC::Cmd::run( command => ['script/gitlab-api-v4', @_] );
21+
IPC::Cmd::run( command => [$^X, '-I', 'lib', 'script/gitlab-api-v4', @_] );
2422

2523
if ($ok) {
2624
$stdout = join('',@$stdout);

0 commit comments

Comments
 (0)