summaryrefslogtreecommitdiff
path: root/t/t2006-checkout-index-basic.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t2006-checkout-index-basic.sh')
-rwxr-xr-xt/t2006-checkout-index-basic.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t2006-checkout-index-basic.sh b/t/t2006-checkout-index-basic.sh
index 57cbdfe9bc..8e181dbf01 100755
--- a/t/t2006-checkout-index-basic.sh
+++ b/t/t2006-checkout-index-basic.sh
@@ -21,4 +21,15 @@ test_expect_success 'checkout-index -h in broken repository' '
test_i18ngrep "[Uu]sage" broken/usage
'
+test_expect_success 'checkout-index reports errors (cmdline)' '
+ test_must_fail git checkout-index -- does-not-exist 2>stderr &&
+ test_i18ngrep not.in.the.cache stderr
+'
+
+test_expect_success 'checkout-index reports errors (stdin)' '
+ echo does-not-exist |
+ test_must_fail git checkout-index --stdin 2>stderr &&
+ test_i18ngrep not.in.the.cache stderr
+'
+
test_done