Skip to content

Commit 934e330

Browse files
committed
Merge branch 'ad/5580-unc-tests-on-cygwin' into maint
UNC paths are also relevant in Cygwin builds and they are now tested just like Mingw builds. * ad/5580-unc-tests-on-cygwin: t5580: add Cygwin support
2 parents eae59c1 + f21d60b commit 934e330

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

t/t5580-clone-push-unc.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,18 @@
33
test_description='various Windows-only path tests'
44
. ./test-lib.sh
55

6-
if ! test_have_prereq MINGW; then
6+
if test_have_prereq CYGWIN
7+
then
8+
alias winpwd='cygpath -aw .'
9+
elif test_have_prereq MINGW
10+
then
11+
alias winpwd=pwd
12+
else
713
skip_all='skipping Windows-only path tests'
814
test_done
915
fi
1016

11-
UNCPATH="$(pwd)"
17+
UNCPATH="$(winpwd)"
1218
case "$UNCPATH" in
1319
[A-Z]:*)
1420
# Use administrative share e.g. \\localhost\C$\git-sdk-64\usr\src\git
@@ -45,8 +51,8 @@ test_expect_success push '
4551
test "$rev" = "$(git rev-parse --verify refs/heads/to-push)"
4652
'
4753

48-
test_expect_success 'remote nick cannot contain backslashes' '
49-
BACKSLASHED="$(pwd | tr / \\\\)" &&
54+
test_expect_success MINGW 'remote nick cannot contain backslashes' '
55+
BACKSLASHED="$(winpwd | tr / \\\\)" &&
5056
git ls-remote "$BACKSLASHED" >out 2>err &&
5157
test_i18ngrep ! "unable to access" err
5258
'

0 commit comments

Comments
 (0)