X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2Flib%2FApp%2FRgit%2FTestUtils.pm;h=321f96474b6972f69f65ec0b490a6931dabd95d1;hb=517c579bda9717613f7faa9ffe41ef1648199e9b;hp=de5b808da0e38a4a9ea52cd6889d22d778043da8;hpb=e295d1865b0480223b82fe2373ba79cf5485466e;p=perl%2Fmodules%2Frgit.git diff --git a/t/lib/App/Rgit/TestUtils.pm b/t/lib/App/Rgit/TestUtils.pm index de5b808..321f964 100644 --- a/t/lib/App/Rgit/TestUtils.pm +++ b/t/lib/App/Rgit/TestUtils.pm @@ -3,16 +3,17 @@ package App::Rgit::TestUtils; use strict; use warnings; -use Cwd qw/abs_path/; -use File::Temp qw/tempfile/; -use File::Spec::Functions qw/curdir catfile/; -use POSIX qw/WIFEXITED WEXITSTATUS WIFSIGNALED WTERMSIG/; +use Cwd qw/abs_path/; +use File::Temp qw/tempfile/; +use File::Spec (); # curdir, catfile +use POSIX qw/WIFEXITED WEXITSTATUS WIFSIGNALED WTERMSIG/; BEGIN { no warnings 'redefine'; *WIFEXITED = sub { 1 } unless eval { WIFEXITED(0); 1 }; *WEXITSTATUS = sub { shift() >> 8 } unless eval { WEXITSTATUS(0); 1 }; *WIFSIGNALED = sub { shift() & 127 } unless eval { WIFSIGNALED(0); 1 }; + *WTERMSIG = sub { shift() & 127 } unless eval { WTERMSIG(0); 1 }; } use base qw/Exporter/; @@ -31,7 +32,7 @@ TRY: 'version', ); - my $git = catfile(curdir, qw/t bin git/); + my $git = File::Spec->catfile(File::Spec->curdir, qw/t bin git/); if ($^O eq 'MSWin32') { unless (-x $git) { $git .= '.bat';