]> git.ipfire.org Git - thirdparty/git.git/blame - t/t2107-update-index-basic.sh
Fix tests under GETTEXT_POISON on parseopt
[thirdparty/git.git] / t / t2107-update-index-basic.sh
CommitLineData
9c7c27ee
NTND
1#!/bin/sh
2
3test_description='basic update-index tests
4
5Tests for command-line parsing and basic operation.
6'
7
8. ./test-lib.sh
9
10test_expect_success 'update-index --nonsense fails' '
11 test_must_fail git update-index --nonsense 2>msg &&
12 cat msg &&
13 test -s msg
14'
15
ac5ad864 16test_expect_success 'update-index --nonsense dumps usage' '
9c7c27ee 17 test_expect_code 129 git update-index --nonsense 2>err &&
9a001381 18 test_i18ngrep "[Uu]sage: git update-index" err
9c7c27ee
NTND
19'
20
21test_expect_success 'update-index -h with corrupt index' '
22 mkdir broken &&
23 (
24 cd broken &&
25 git init &&
26 >.git/index &&
27 test_expect_code 129 git update-index -h >usage 2>&1
28 ) &&
9a001381 29 test_i18ngrep "[Uu]sage: git update-index" broken/usage
9c7c27ee
NTND
30'
31
32test_done