]> git.ipfire.org Git - thirdparty/git.git/blob - t/t3000-ls-files-others.sh
1f461e3e812a7c71ea2d4fa6ff60d07b050392db
[thirdparty/git.git] / t / t3000-ls-files-others.sh
1 #!/bin/sh
2 #
3 # Copyright (c) 2005 Junio C Hamano
4 #
5
6 test_description='git-ls-files test (--others should pick up symlinks).
7
8 This test runs git-ls-files --others with the following on the
9 filesystem.
10
11 path0 - a file
12 path1 - a symlink
13 path2/file2 - a file in a directory
14 '
15 . ./test-lib.sh
16
17 date >path0
18 ln -s xyzzy path1
19 mkdir path2
20 date >path2/file2
21 test_expect_success \
22 'git-ls-files --others to show output.' \
23 'git-ls-files --others >output'
24 cat >expected <<EOF
25 output
26 path0
27 path1
28 path2/file2
29 EOF
30
31 test_expect_success \
32 'git-ls-files --others should pick up symlinks.' \
33 'diff output expected'
34 test_done