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>
Johannes Sixt committed
May 12, 2011 at 10:21 UTC
650af7ae8bdf92bd92df20152b6d1ad7eb014169
1 file changed
+6
-2
t/t3703-add-magic-pathspec.sh
+6
-2
@@ -44,8 +44,12 @@ test_expect_success 'a file with the same (long) magic name exists' '
44
git add -n "./:(icase)ha"
45
'
46
47
-test_expect_success 'a file with the same (short) magic name exists' '
48
- mkdir ":" &&
47
+if mkdir ":" 2>/dev/null
48
+then
49
+ test_set_prereq COLON_DIR
50
+fi
51
+
52
+test_expect_success COLON_DIR 'a file with the same (short) magic name exists' '
53
: >":/bar" &&
54
test_must_fail git add -n :/bar &&
55
git add -n "./:/bar"