use GIT_DIR instead of /var/tmp
[git/jnareb-git/bp-gitweb.git] / t / t3000-ls-files-others.sh
blob1f461e3e812a7c71ea2d4fa6ff60d07b050392db
1 #!/bin/sh
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
9 filesystem.
11 path0 - a file
12 path1 - a symlink
13 path2/file2 - a file in a directory
15 . ./test-lib.sh
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
31 test_expect_success \
32 'git-ls-files --others should pick up symlinks.' \
33 'diff output expected'
34 test_done