3 test_description='various Windows-only path tests'
6 if ! test_have_prereq MINGW; then
7 skip_all='skipping Windows-only path tests'
14 # Use administrative share e.g. \\localhost\C$\git-sdk-64\usr\src\git
15 # (we use forward slashes here because MSYS2 and Git accept them, and
16 # they are easier on the eyes)
17 UNCPATH="//localhost/${UNCPATH%%:*}\$/${UNCPATH#?:}"
18 test -d "$UNCPATH" || {
19 skip_all='could not access administrative share; skipping'
24 skip_all='skipping UNC path tests, cannot determine current path as UNC'
29 test_expect_success setup '
33 test_expect_success clone '
34 git clone "file://$UNCPATH" clone
37 test_expect_success push '
40 git checkout -b to-push &&
41 test_commit to-push &&
44 rev="$(git -C clone rev-parse --verify refs/heads/to-push)" &&
45 test "$rev" = "$(git rev-parse --verify refs/heads/to-push)"
48 test_expect_success 'remote nick cannot contain backslashes' '
49 BACKSLASHED="$(pwd | tr / \\\\)" &&
50 git ls-remote "$BACKSLASHED" >out 2>err &&
51 test_i18ngrep ! "unable to access" err