3 test_description
='magic pathspec tests using git-add'
7 test_expect_success
'setup' '
8 mkdir sub anothersub &&
13 test_expect_success
'add :/' "
14 cat >expected <<-EOF &&
20 (cd sub && git add -n :/ >actual) &&
21 test_cmp expected sub/actual
28 test_expect_success
'add :/anothersub' '
29 (cd sub && git add -n :/anothersub >actual) &&
30 test_cmp expected sub/actual
33 test_expect_success
'add :/non-existent' '
34 (cd sub && test_must_fail git add -n :/non-existent)
41 if test_have_prereq
!MINGW
&& mkdir
":" 2>/dev
/null
43 test_set_prereq COLON_DIR
46 test_expect_success COLON_DIR
'a file with the same (long) magic name exists' '
48 test_must_fail git add -n ":(icase)ha" &&
49 git add -n "./:(icase)ha"
52 test_expect_success COLON_DIR
'a file with the same (short) magic name exists' '
54 test_must_fail git add -n :/bar &&