From: Björn Steinbrink Date: Mon, 12 Nov 2007 15:15:39 +0000 (+0100) Subject: git-commit: Add tests for invalid usage of -a/--interactive with paths X-Git-Tag: v1.5.3.7~15^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9d87442f03c9e3fea7e24e2821fc0342f8efe1d6;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/t/t7501-commit.sh b/t/t7501-commit.sh index b151b51a3..7f25689bb 100644 --- a/t/t7501-commit.sh +++ b/t/t7501-commit.sh @@ -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"