diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2007-11-12 15:15:39 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-11-13 02:23:32 (GMT) |
commit | 9d87442f03c9e3fea7e24e2821fc0342f8efe1d6 (patch) | |
tree | f52e75598a9e24e28f1d5ba225d302aa3dbdf8bc /t | |
parent | 34cb704a9b8b45ff3e1342678c5892e1ee6e27f5 (diff) | |
download | git-9d87442f03c9e3fea7e24e2821fc0342f8efe1d6.zip git-9d87442f03c9e3fea7e24e2821fc0342f8efe1d6.tar.gz git-9d87442f03c9e3fea7e24e2821fc0342f8efe1d6.tar.bz2 |
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>
Diffstat (limited to 't')
-rw-r--r-- | t/t7501-commit.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t7501-commit.sh b/t/t7501-commit.sh index b151b51..7f25689 100644 --- a/t/t7501-commit.sh +++ b/t/t7501-commit.sh @@ -34,6 +34,16 @@ test_expect_failure \ "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" |