mirror of
https://github.com/git/git.git
synced 2024-11-27 20:14:30 +08:00
git-commit: Add tests for invalid usage of -a/--interactive with paths
git-commit was/is broken in that it accepts paths together with -a or --interactive, which it shouldn't. There tests check those usage errors. Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
34cb704a9b
commit
9d87442f03
@ -33,6 +33,16 @@ test_expect_failure \
|
||||
"invalid options 2" \
|
||||
"git-commit -C HEAD -m illegal"
|
||||
|
||||
test_expect_failure \
|
||||
"using paths with -a" \
|
||||
"echo King of the bongo >file &&
|
||||
git-commit -m foo -a file"
|
||||
|
||||
test_expect_failure \
|
||||
"using paths with --interactive" \
|
||||
"echo bong-o-bong >file &&
|
||||
echo 7 | git-commit -m foo --interactive file"
|
||||
|
||||
test_expect_failure \
|
||||
"using invalid commit with -C" \
|
||||
"git-commit -C bogus"
|
||||
|
Loading…
Reference in New Issue
Block a user