From: Stephen Boyd Date: Sat, 16 May 2009 09:24:45 +0000 (-0700) Subject: tests: Add tests for missing format-patch long options X-Git-Tag: v1.6.3.2~40 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f044fe2de6f7bbace158853c075a4065f3722265;p=git.git tests: Add tests for missing format-patch long options Exercise format-patch's --signoff, --in-reply-to and --start-number long options. Signed-off-by: Stephen Boyd Signed-off-by: Junio C Hamano --- diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh index 11061ddd5..922a8941e 100755 --- a/t/t4014-format-patch.sh +++ b/t/t4014-format-patch.sh @@ -505,4 +505,15 @@ test_expect_success 'format-patch from a subdirectory (3)' ' test -f "$basename" ' +test_expect_success 'format-patch --in-reply-to' ' + git format-patch -1 --stdout --in-reply-to "baz@foo.bar" > patch8 && + grep "^In-Reply-To: " patch8 && + grep "^References: " patch8 +' + +test_expect_success 'format-patch --signoff' ' + git format-patch -1 --signoff --stdout | + grep "^Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>" +' + test_done diff --git a/t/t4021-format-patch-numbered.sh b/t/t4021-format-patch-numbered.sh index 390af2389..3c27f0dc1 100755 --- a/t/t4021-format-patch-numbered.sh +++ b/t/t4021-format-patch-numbered.sh @@ -108,4 +108,10 @@ test_expect_success 'format.numbered = auto && --no-numbered' ' ' +test_expect_success '--start-number && --numbered' ' + + git format-patch --start-number 3 --numbered --stdout HEAD~1 > patch8 && + grep "^Subject: \[PATCH 3/3\]" patch8 +' + test_done