From: Jeff King Date: Mon, 9 May 2011 23:53:00 +0000 (-0700) Subject: t7501.8: feed a meaningful command X-Git-Tag: v1.7.6-rc0~64^2~4 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=587ac8c9d4b4a9e054dddb4779f6206fde5950ef;p=git.git t7501.8: feed a meaningful command The command expects "git commit --interactive " to fail because you cannot (yet) limit "commit --interactive" with a pathspec, but even if the command allowed to take , the test would have failed as saying just 7:quit would leave the index the same as the current commit, leading to an attempt to create an empty commit that would fail without --allow-empty. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- diff --git a/t/t7501-commit.sh b/t/t7501-commit.sh index a76c47419..3d2b14d30 100755 --- a/t/t7501-commit.sh +++ b/t/t7501-commit.sh @@ -41,10 +41,12 @@ test_expect_success \ "echo King of the bongo >file && test_must_fail git commit -m foo -a file" -test_expect_success PERL \ - "using paths with --interactive" \ - "echo bong-o-bong >file && - ! (echo 7 | git commit -m foo --interactive file)" +test_expect_success PERL 'cannot use paths with --interactive' ' + echo bong-o-bong >file && + # 2: update, 1:st path, that is all, 7: quit + ( echo 2; echo 1; echo; echo 7 ) | + test_must_fail git commit -m foo --interactive file +' test_expect_success \ "using invalid commit with -C" \