aboutsummaryrefslogtreecommitdiff
path: root/t/t3703-add-magic-pathspec.sh
diff options
context:
space:
mode:
authorJohannes Sixt <j6t@kdbg.org>2011-05-12 10:21:33 +0200
committerJunio C Hamano <gitster@pobox.com>2011-05-12 22:32:24 -0700
commit650af7ae8bdf92bd92df20152b6d1ad7eb014169 (patch)
treecbb8c63dba48dbd48465f31e53af501a536041d5 /t/t3703-add-magic-pathspec.sh
parent93e7d672fcac8bdc16ae7276bc5942889aa3f179 (diff)
downloadgit-650af7ae8bdf92bd92df20152b6d1ad7eb014169.tar.gz
git-650af7ae8bdf92bd92df20152b6d1ad7eb014169.tar.xz
t3703: Skip tests using directory name ":" on Windows
":" is not allowed in file names on Windows. Detect this case and skip a test if necessary. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3703-add-magic-pathspec.sh')
-rwxr-xr-xt/t3703-add-magic-pathspec.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/t/t3703-add-magic-pathspec.sh b/t/t3703-add-magic-pathspec.sh
index ce5585ebb..e508246c0 100755
--- a/t/t3703-add-magic-pathspec.sh
+++ b/t/t3703-add-magic-pathspec.sh
@@ -44,8 +44,12 @@ test_expect_success 'a file with the same (long) magic name exists' '
git add -n "./:(icase)ha"
'
-test_expect_success 'a file with the same (short) magic name exists' '
- mkdir ":" &&
+if mkdir ":" 2>/dev/null
+then
+ test_set_prereq COLON_DIR
+fi
+
+test_expect_success COLON_DIR 'a file with the same (short) magic name exists' '
: >":/bar" &&
test_must_fail git add -n :/bar &&
git add -n "./:/bar"