Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

t/11-create.t: fix path tests under Win32

  • Loading branch information...
commit 9d68213c8f9ecb007dd5356a93a22b53d48f4bef 1 parent 3652f64
@book book authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 t/11-create.t
View
8 t/11-create.t
@@ -4,7 +4,7 @@ use Test::More;
use File::Temp qw( tempdir );
use File::Spec;
use File::Path;
-use Cwd qw( cwd abs_path );
+use Cwd qw( cwd realpath );
use Git::Repository;
plan skip_all => 'Default git binary not found in PATH'
@@ -21,7 +21,7 @@ delete @ENV{qw( GIT_DIR GIT_WORK_TREE )};
my $home = cwd();
# a place to put a git repository
-my $tmp = abs_path( tempdir( CLEANUP => 1 ) );
+my $tmp = realpath( tempdir( CLEANUP => 1 ) );
# some dirname generating routine
my $i;
@@ -31,6 +31,10 @@ sub next_dir { return File::Spec->catdir( $tmp, ++$i ); }
sub test_repo {
my ( $r, $gitdir, $dir, $options ) = @_;
+ # normalize under Win32, but do not die
+ eval { $gitdir = realpath($gitdir) };
+ eval { $dir = realpath($dir) };
+
local $Test::Builder::Level = $Test::Builder::Level + 1;
isa_ok( $r, 'Git::Repository' );
is( $r->git_dir, $gitdir, '... correct git_dir' );
Please sign in to comment.
Something went wrong with that request. Please try again.