range-diff: combine all options in a single data structure
[alt-git.git] / t / t2006-checkout-index-basic.sh
blob8e181dbf01c46a324b54471cc62e1c9291852079
1 #!/bin/sh
3 test_description='basic checkout-index tests
6 . ./test-lib.sh
8 test_expect_success 'checkout-index --gobbledegook' '
9 test_expect_code 129 git checkout-index --gobbledegook 2>err &&
10 test_i18ngrep "[Uu]sage" err
13 test_expect_success 'checkout-index -h in broken repository' '
14 mkdir broken &&
16 cd broken &&
17 git init &&
18 >.git/index &&
19 test_expect_code 129 git checkout-index -h >usage 2>&1
20 ) &&
21 test_i18ngrep "[Uu]sage" broken/usage
24 test_expect_success 'checkout-index reports errors (cmdline)' '
25 test_must_fail git checkout-index -- does-not-exist 2>stderr &&
26 test_i18ngrep not.in.the.cache stderr
29 test_expect_success 'checkout-index reports errors (stdin)' '
30 echo does-not-exist |
31 test_must_fail git checkout-index --stdin 2>stderr &&
32 test_i18ngrep not.in.the.cache stderr
35 test_done