summaryrefslogtreecommitdiff
path: root/t/t7501-commit.sh
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2007-11-12 16:15:39 +0100
committerJunio C Hamano <gitster@pobox.com>2007-11-12 18:23:32 -0800
commit9d87442f03c9e3fea7e24e2821fc0342f8efe1d6 (patch)
treef52e75598a9e24e28f1d5ba225d302aa3dbdf8bc /t/t7501-commit.sh
parent34cb704a9b8b45ff3e1342678c5892e1ee6e27f5 (diff)
downloadgit-9d87442f03c9e3fea7e24e2821fc0342f8efe1d6.tar.gz
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/t7501-commit.sh')
-rw-r--r--t/t7501-commit.sh10
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"