3 # Copyright (c) 2005 Junio C Hamano
6 test_description
='git ls-files test (--others should pick up symlinks).
8 This test runs git ls-files --others with the following on the
13 path2/file2 - a file in a directory
14 path3-junk - a file to confuse things
15 path3/file3 - a file in a directory
16 path4 - an empty directory
21 if test_have_prereq SYMLINKS
27 mkdir path2 path3 path4
32 git update-index
--add path3-junk path
3/file3
44 sed -e 's|path2/file2|path2/|' <expected1
>expected2
45 cat <expected2
>expected3
46 echo path
4/ >>expected2
49 'git ls-files --others to show output.' \
50 'git ls-files --others >output'
53 'git ls-files --others should pick up symlinks.' \
54 'test_cmp expected1 output'
57 'git ls-files --others --directory to show output.' \
58 'git ls-files --others --directory >output'
62 'git ls-files --others --directory should not get confused.' \
63 'test_cmp expected2 output'
66 'git ls-files --others --directory --no-empty-directory to show output.' \
67 'git ls-files --others --directory --no-empty-directory >output'
70 '--no-empty-directory hides empty directory' \
71 'test_cmp expected3 output'