3 test_description
='magic pathspec tests using git-add'
5 TEST_PASSES_SANITIZE_LEAK
=true
8 test_expect_success
'setup' '
9 mkdir sub anothersub &&
14 test_expect_success
'add :/' "
15 cat >expected <<-EOF &&
21 (cd sub && git add -n :/ >actual) &&
22 test_cmp expected sub/actual
29 test_expect_success
'add :/anothersub' '
30 (cd sub && git add -n :/anothersub >actual) &&
31 test_cmp expected sub/actual
34 test_expect_success
'add :/non-existent' '
35 (cd sub && test_must_fail git add -n :/non-existent)
42 if test_have_prereq
!MINGW
&& mkdir
":" 2>/dev
/null
44 test_set_prereq COLON_DIR
47 test_expect_success COLON_DIR
'a file with the same (long) magic name exists' '
49 test_must_fail git add -n ":(icase)ha" &&
50 git add -n "./:(icase)ha"
53 test_expect_success COLON_DIR
'a file with the same (short) magic name exists' '
55 test_must_fail git add -n :/bar &&