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/t3002-ls-files-dashpath.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 / t3002-ls-files-dashpath.sh` 78 lines ยท 1551 bytes Raw Blame History 1 #!/bin/sh 2 # 3 # Copyright (c) 2005 Junio C Hamano 4 # 5 6 test_description='git ls-files test (-- to terminate the path list). 7 8 This test runs git ls-files --others with the following on the 9 filesystem. 10 11 path0 - a file 12 -foo - a file with a funny name. 13 -- - another file with a funny name. 14 ' 15 16 . ./test-lib.sh 17 18 test_expect_success 'setup' ' 19 echo frotz >path0 && 20 echo frotz >./-foo && 21 echo frotz >./-- 22 ' 23 24 test_expect_success 'git ls-files without path restriction.' ' 25 test_when_finished "rm -f expect" && 26 git ls-files --others >output && 27 test_filter_gitconfig output && 28 cat >expect <<-\EOF && 29 -- 30 -foo 31 output 32 path0 33 EOF 34 test_cmp output expect 35 ' 36 37 test_expect_success 'git ls-files with path restriction.' ' 38 test_when_finished "rm -f expect" && 39 git ls-files --others path0 >output && 40 cat >expect <<-\EOF && 41 path0 42 EOF 43 test_cmp output expect 44 ' 45 46 test_expect_success 'git ls-files with path restriction with --.' ' 47 test_when_finished "rm -f expect" && 48 git ls-files --others -- path0 >output && 49 cat >expect <<-\EOF && 50 path0 51 EOF 52 test_cmp output expect 53 ' 54 55 test_expect_success 'git ls-files with path restriction with -- --.' ' 56 test_when_finished "rm -f expect" && 57 git ls-files --others -- -- >output && 58 cat >expect <<-\EOF && 59 -- 60 EOF 61 test_cmp output expect 62 ' 63 64 test_expect_success 'git ls-files with no path restriction.' ' 65 test_when_finished "rm -f expect" && 66 git ls-files --others -- >output && 67 test_filter_gitconfig output && 68 cat >expect <<-\EOF && 69 -- 70 -foo 71 output 72 path0 73 EOF 74 test_cmp output expect 75 76 ' 77 78 test_done