Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/t/t3703-add-magic-pathspec.sh # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / t / t3703-add-magic-pathspec.sh` 58 lines ยท 1113 bytes Raw Blame History 1 #!/bin/sh 2 3 test_description='magic pathspec tests using git-add' 4 5 . ./test-lib.sh 6 7 test_expect_success 'setup' ' 8 mkdir sub anothersub && 9 : >sub/foo && 10 : >anothersub/foo 11 ' 12 13 test_expect_success 'add :/' " 14 cat >expected <<-EOF && 15 add 'anothersub/foo' 16 add 'expected' 17 add 'sub/actual' 18 add 'sub/foo' 19 EOF 20 (cd sub && git add -n :/ >actual) && 21 test_cmp expected sub/actual 22 " 23 24 cat >expected <actual) && 30 test_cmp expected sub/actual 31 ' 32 33 test_expect_success 'add :/non-existent' ' 34 (cd sub && test_must_fail git add -n :/non-existent) 35 ' 36 37 cat >expected </dev/null 42 then 43 test_set_prereq COLON_DIR 44 fi 45 46 test_expect_success COLON_DIR 'a file with the same (long) magic name exists' ' 47 : >":(icase)ha" && 48 test_must_fail git add -n ":(icase)ha" && 49 git add -n "./:(icase)ha" 50 ' 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" 56 ' 57 58 test_done