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 test_expect_success
'a file with the same (long) magic name exists' '
43 test_must_fail git add -n ":(icase)ha" &&
44 git add -n "./:(icase)ha"
47 if mkdir
":" 2>/dev
/null
49 test_set_prereq COLON_DIR
52 test_expect_success COLON_DIR
'a file with the same (short) magic name exists' '
54 test_must_fail git add -n :/bar &&