Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'js/mingw-tests'
* js/mingw-tests:
  t9700: fix test for perl older than 5.14
  • Loading branch information
Junio C Hamano committed Mar 4, 2016
2 parents d285ab0 + 839b639 commit 2e7b6af
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion t/t9700/test.pl
Expand Up @@ -17,6 +17,12 @@ BEGIN
use Cwd;
use File::Basename;

sub adjust_dirsep {
my $path = shift;
$path =~ s{\\}{/}g;
return $path;
}

BEGIN { use_ok('Git') }

# set up
Expand All @@ -33,7 +39,7 @@ BEGIN
is($r->config_int("test.nonexistent"), undef, "config_int: nonexistent");
ok($r->config_bool("test.booltrue"), "config_bool: true");
ok(!$r->config_bool("test.boolfalse"), "config_bool: false");
is($r->config_path("test.path") =~ s/\\/\//gr, $r->config("test.pathexpanded"),
is(adjust_dirsep($r->config_path("test.path")), $r->config("test.pathexpanded"),
"config_path: ~/foo expansion");
is_deeply([$r->config_path("test.pathmulti")], ["foo", "bar"],
"config_path: multiple values");
Expand Down

0 comments on commit 2e7b6af

Please sign in to comment.