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>
Björn Steinbrink committed
Nov 12, 2007 at 16:15 UTC
9d87442f03c9e3fea7e24e2821fc0342f8efe1d6
1 file changed
+10
t/t7501-commit.sh
+10
@@ -33,6 +33,16 @@ test_expect_failure \
33
"invalid options 2" \
34
"git-commit -C HEAD -m illegal"
35
36
+test_expect_failure \
37
+ "using paths with -a" \
38
+ "echo King of the bongo >file &&
39
+ git-commit -m foo -a file"
40
+
41
+test_expect_failure \
42
+ "using paths with --interactive" \
43
+ "echo bong-o-bong >file &&
44
+ echo 7 | git-commit -m foo --interactive file"
45
+
46
test_expect_failure \
47
"using invalid commit with -C" \
48
"git-commit -C bogus"