From: Junio C Hamano Date: Wed, 19 Dec 2012 15:46:05 +0000 (-0800) Subject: Merge branch 'jc/maint-test-portability' into 'jc/test-portability' X-Git-Tag: v1.8.1.1~42^2~2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/ecd3e2f42504f035620376343db1a4cbafe5db92?ds=inline;hp=-c Merge branch 'jc/maint-test-portability' into 'jc/test-portability' * jc/maint-test-portability: t4014: fix arguments to grep t9502: do not assume GNU tar t0200: "locale" may not exist --- ecd3e2f42504f035620376343db1a4cbafe5db92 diff --combined t/t4014-format-patch.sh index 16a4ca1d60,e47efc37da..90fd598c74 --- a/t/t4014-format-patch.sh +++ b/t/t4014-format-patch.sh @@@ -155,7 -155,7 +155,7 @@@ test_expect_failure 'additional comman git config --replace-all format.headers "Cc: R E Cipient " && git format-patch --cc="S. E. Cipient " --stdout master..side | sed -e "/^\$/q" >patch5 && grep "^Cc: R E Cipient ,\$" patch5 && - grep "^ *"S. E. Cipient" \$" patch5 + grep "^ *\"S. E. Cipient\" \$" patch5 ' test_expect_success 'command line headers' ' @@@ -183,7 -183,7 +183,7 @@@ test_expect_success 'command line To: h test_expect_failure 'command line To: header (rfc822)' ' git format-patch --to="R. E. Cipient " --stdout master..side | sed -e "/^\$/q" >patch8 && - grep "^To: "R. E. Cipient" \$" patch8 + grep "^To: \"R. E. Cipient\" \$" patch8 ' test_expect_failure 'command line To: header (rfc2047)' ' @@@ -203,7 -203,7 +203,7 @@@ test_expect_failure 'configuration To: git config format.to "R. E. Cipient " && git format-patch --stdout master..side | sed -e "/^\$/q" >patch9 && - grep "^To: "R. E. Cipient" \$" patch9 + grep "^To: \"R. E. Cipient\" \$" patch9 ' test_expect_failure 'configuration To: header (rfc2047)' ' @@@ -650,19 -650,8 +650,19 @@@ test_expect_success 'format-patch --in- ' test_expect_success 'format-patch --signoff' ' - git format-patch -1 --signoff --stdout | - grep "^Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>" + git format-patch -1 --signoff --stdout >out && + grep "^Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>" out +' + +test_expect_success 'format-patch --notes --signoff' ' + git notes --ref test add -m "test message" HEAD && + git format-patch -1 --signoff --stdout --notes=test >out && + # Three dashes must come after S-o-b + ! sed "/^Signed-off-by: /q" out | grep "test message" && + sed "1,/^Signed-off-by: /d" out | grep "test message" && + # Notes message must come after three dashes + ! sed "/^---$/q" out | grep "test message" && + sed "1,/^---$/d" out | grep "test message" ' echo "fatal: --name-only does not make sense" > expect.name-only