debian: new upstream point release
[git/debian.git] / t / t3004-ls-files-basic.sh
blob8d9bc3c2af6ad84c006010ee7be65146107c2259
1 #!/bin/sh
3 test_description='basic ls-files tests
5 This test runs git ls-files with various unusual or malformed
6 command-line arguments.
9 . ./test-lib.sh
11 >empty
13 test_expect_success 'ls-files in empty repository' '
14 git ls-files >actual &&
15 test_cmp empty actual
18 test_expect_success 'ls-files with nonexistent path' '
19 git ls-files doesnotexist >actual &&
20 test_cmp empty actual
23 test_expect_success 'ls-files with nonsense option' '
24 test_expect_code 129 git ls-files --nonsense 2>actual &&
25 test_i18ngrep "[Uu]sage: git ls-files" actual
28 test_expect_success 'ls-files -h in corrupt repository' '
29 mkdir broken &&
31 cd broken &&
32 git init &&
33 >.git/index &&
34 test_expect_code 129 git ls-files -h >usage 2>&1
35 ) &&
36 test_i18ngrep "[Uu]sage: git ls-files " broken/usage
39 test_done