aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-03-04 10:14:39 -0800
committerJunio C Hamano <gitster@pobox.com>2016-03-04 10:14:39 -0800
commit2e7b6afcba4993a1a424725afaa508b2641fb416 (patch)
tree89fd3d22a3633c69a870d4fa4da22e01afdec1e7 /t
parentd285ab0a41c5c04222cf356066d1df1e6096c5a7 (diff)
parent839b6397be260592f5afd193279c5dbfb99ce093 (diff)
downloadgit-2e7b6afcba4993a1a424725afaa508b2641fb416.tar.gz
git-2e7b6afcba4993a1a424725afaa508b2641fb416.tar.xz
Merge branch 'js/mingw-tests'
* js/mingw-tests: t9700: fix test for perl older than 5.14
Diffstat (limited to 't')
-rwxr-xr-xt/t9700/test.pl8
1 files changed, 7 insertions, 1 deletions
diff --git a/t/t9700/test.pl b/t/t9700/test.pl
index 7e8c40b97..1b75c9196 100755
--- a/t/t9700/test.pl
+++ b/t/t9700/test.pl
@@ -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
@@ -33,7 +39,7 @@ is($r->config_int("test.int"), 2048, "config_int: integer");
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");