Tutorial typofix.
[git/jrn.git] / t / t3001-ls-files-others-exclude.sh
blob4b9380fa09aa91f0869fc3c2867bf7b22db20542
1 #!/bin/sh
3 # Copyright (c) 2005 Junio C Hamano
6 test_description='git-ls-files --others --exclude
8 This test runs git-ls-files --others and tests --exclude patterns.
11 . ./test-lib.sh
13 rm -fr one three
14 for dir in . one one/two three
16 mkdir -p $dir &&
17 for i in 1 2 3 4 5
19 >$dir/a.$i
20 done
21 done
23 cat >expect <<EOF
24 a.2
25 a.4
26 a.5
27 one/a.3
28 one/a.4
29 one/a.5
30 one/two/a.3
31 one/two/a.5
32 three/a.2
33 three/a.3
34 three/a.4
35 three/a.5
36 EOF
38 echo '.gitignore
39 output
40 expect
41 .gitignore
42 ' >.git/ignore
44 echo '*.1
45 /*.3' >.gitignore
46 echo '*.2
47 two/*.4' >one/.gitignore
49 test_expect_success \
50 'git-ls-files --others --exclude.' \
51 'git-ls-files --others \
52 --exclude-per-directory=.gitignore \
53 --exclude-from=.git/ignore \
54 >output &&
55 diff -u expect output'