From: Miklos Vajna Date: Sat, 06 Mar 2010 00:39:48 GMT Subject: [PATCH] Add tests for git format-patch --to and format.to config option Message-ID: <20100306003946.GD27414@genesis.frugalware.org> In-Reply-To: <7v7hptt0mr.fsf@alter.siamese.dyndns.org> Signed-off-by: Miklos Vajna --- On Wed, Mar 03, 2010 at 04:02:20PM -0800, Junio C Hamano wrote: > * sd/format-patch-to (2010-02-17) 1 commit > - Add 'git format-patch --to=' option and 'format.to' configuration variable. > > Shouldn't be too hard to add tests to t4014; other than that looked ready > for 'next'. Here is a patch that does so. t/t4014-format-patch.sh | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh index f2a2aaa..9305c98 100755 --- a/t/t4014-format-patch.sh +++ b/t/t4014-format-patch.sh @@ -531,6 +531,26 @@ test_expect_success 'format-patch --in-reply-to' ' grep "^References: " patch8 ' +test_expect_success 'command line to' ' + + git format-patch --to="R. E. Cipient " --stdout master..side | sed -e "/^\$/q" >patch9 && + grep "^To: R. E. Cipient " patch9 +' + +test_expect_success 'configuration to' ' + + git config --replace-all format.to "R. E. Cipient " && + git format-patch --stdout master..side | sed -e "/^\$/q" >patch10 && + grep "^To: R. E. Cipient " patch10 +' + +test_expect_success 'additional command line to' ' + + git format-patch --to="S. E. Cipient " --stdout master..side | sed -e "/^\$/q" >patch11 && + grep "^To: R. E. Cipient ,\$" patch11 && + grep "^ *S. E. Cipient \$" patch11 +' + test_expect_success 'format-patch --signoff' ' git format-patch -1 --signoff --stdout | grep "^Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>" -- 1.7.0