diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2007-11-12 16:15:39 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-11-12 18:23:32 -0800 |
commit | 9d87442f03c9e3fea7e24e2821fc0342f8efe1d6 (patch) | |
tree | f52e75598a9e24e28f1d5ba225d302aa3dbdf8bc | |
parent | git-commit.sh: Fix usage checks regarding paths given when they do not make s... (diff) | |
download | tgif-9d87442f03c9e3fea7e24e2821fc0342f8efe1d6.tar.xz |
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>
-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 b151b51a34..7f25689bb7 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" |