Revert "MinGW: Add missing file mode bit defines"
[git/mingw/4msysgit/gitPS1fix.git] / t / t2107-update-index-basic.sh
blob809fafe208cbf68121295922a4c230b2a5e1aee3
1 #!/bin/sh
3 test_description='basic update-index tests
5 Tests for command-line parsing and basic operation.
8 . ./test-lib.sh
10 test_expect_success 'update-index --nonsense fails' '
11 test_must_fail git update-index --nonsense 2>msg &&
12 cat msg &&
13 test -s msg
16 test_expect_success 'update-index --nonsense dumps usage' '
17 test_expect_code 129 git update-index --nonsense 2>err &&
18 grep "[Uu]sage: git update-index" err
21 test_expect_success 'update-index -h with corrupt index' '
22 mkdir broken &&
24 cd broken &&
25 git init &&
26 >.git/index &&
27 test_expect_code 129 git update-index -h >usage 2>&1
28 ) &&
29 grep "[Uu]sage: git update-index" broken/usage
32 test_done