[PATCH 2/2] Test framework documentation.
[git.git] / t / t0400-ls-files.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 path0
26 path1
27 path2/file2
28 EOF
29
30 test_expect_success \
31     'git-ls-files --others should pick up symlinks.' \
32     'diff .output .expected'
33 test_done