Skip to content

Commit 650af7a

Browse files
j6tgitster
authored andcommitted
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>
1 parent 93e7d67 commit 650af7a

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

t/t3703-add-magic-pathspec.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,12 @@ test_expect_success 'a file with the same (long) magic name exists' '
4444
git add -n "./:(icase)ha"
4545
'
4646

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' '
4953
: >":/bar" &&
5054
test_must_fail git add -n :/bar &&
5155
git add -n "./:/bar"

0 commit comments

Comments
 (0)