Skip to content

Commit 2e7b6af

Browse files
committed
Merge branch 'js/mingw-tests'
* js/mingw-tests: t9700: fix test for perl older than 5.14
2 parents d285ab0 + 839b639 commit 2e7b6af

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

t/t9700/test.pl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ BEGIN
1717
use Cwd;
1818
use File::Basename;
1919

20+
sub adjust_dirsep {
21+
my $path = shift;
22+
$path =~ s{\\}{/}g;
23+
return $path;
24+
}
25+
2026
BEGIN { use_ok('Git') }
2127

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

0 commit comments

Comments
 (0)