git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 2/3] tests: Add tests for missing format-patch long options

From
Stephen Boyd <bebarino@gmail.com>
Date
May 16, 2009, 09:24 UTC
Message-ID
<1242465886-31769-2-git-send-email-bebarino@gmail.com>
In-Reply-To
<1242465886-31769-1-git-send-email-bebarino@gmail.com>

Exercise format-patch's --signoff, --in-reply-to and --start-number long options.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
---
 t/t4014-format-patch.sh          |   11 +++++++++++
 t/t4021-format-patch-numbered.sh |    6 ++++++
 2 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh
index 11061dd..922a894 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: <baz@foo.bar>" patch8 &&
+	grep "^References: <baz@foo.bar>" 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 390af23..3c27f0d 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
-- 
1.6.3.1.9.g95405b
Previous: Stephen BoydNext: Stephen Boyd
Message 2 of 5 in “api-parse-options.txt: use 'func' instead of 'funct'”
  1. 1/3 api-parse-options.txt: use 'func' instead of 'funct'Stephen Boyd, May 16, 2009
  2. 2/3 tests: Add tests for missing format-patch long optionsStephen Boyd, May 16, 2009
  3. 3/3 format-patch: migrate to parse-options APIStephen Boyd, May 16, 2009
  4. format-patch: migrate to parse-options APIStephen Boyd, May 16, 2009
  5. Stephen BoydMay 17, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.