mingw: verify that paths are not mistaken for remote nicknames
This added test case simply verifies that users will not be bothered with bogus complaints à la warning: unable to access '.git/remotes/D:\repo': Invalid argument when fetching from a Windows path (in this case, D:\repo). [j6t: mark the new test as test_expect_failure] Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin committed
May 29, 2017 at 22:25 UTC
13b57da83384e9523943ea9d8ecf3ec7993ce56a
1 file changed
+8
-2
t/t5580-clone-push-unc.sh
+8
-2
@@ -1,10 +1,10 @@
1
#!/bin/sh
2
3
-test_description='various UNC path tests (Windows-only)'
3
+test_description='various Windows-only path tests'
4
. ./test-lib.sh
5
6
if ! test_have_prereq MINGW; then
7
- skip_all='skipping UNC path tests, requires Windows'
7
+ skip_all='skipping Windows-only path tests'
8
test_done
9
fi
10
@@ -45,4 +45,10 @@ test_expect_success push '
45
test "$rev" = "$(git rev-parse --verify refs/heads/to-push)"
46
'
47
48
+test_expect_failure 'remote nick cannot contain backslashes' '
49
+ BACKSLASHED="$(pwd | tr / \\\\)" &&
50
+ git ls-remote "$BACKSLASHED" >out 2>err &&
51
+ test_i18ngrep ! "unable to access" err
52
+'
53
+
54
test_done