diff mbox series

[1/5] t4014: Add test checking cover-letter To header

Message ID 20230119223858.29262-2-zev@bewilderbeest.net (mailing list archive)
State New, archived
Headers show
Series format-patch: Add --{to,cc}-cmd support | expand

Commit Message

Zev Weiss Jan. 19, 2023, 10:38 p.m. UTC
I at first inadvertently broke this in the process of adding
--{to,cc}-cmd support to format-patch and didn't immediately notice
because there wasn't a test for it, so let's add one now.

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
---
 t/t4014-format-patch.sh | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Calvin Wan Feb. 1, 2023, 11:52 p.m. UTC | #1
> +test_expect_success 'cover-letter gets To: header' '
> +	rm -fr patches &&
> +	git config --unset-all format.to &&
> +	git format-patch -o patches --cover-letter --to "R E Cipient <rcipient@example.com>" main..side >list &&
> +	grep "^To: R E Cipient <rcipient@example.com>\$" patches/0000-cover-letter.patch
> +'
> +
>  test_done

'>list' is unnecessary. The test can also be moved closer to other
cover-letter or header tests.
diff mbox series

Patch

diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh
index 012f155e10ae..ba5fd0efe2ae 100755
--- a/t/t4014-format-patch.sh
+++ b/t/t4014-format-patch.sh
@@ -2368,4 +2368,11 @@  test_expect_success 'interdiff: solo-patch' '
 	test_cmp expect actual
 '
 
+test_expect_success 'cover-letter gets To: header' '
+	rm -fr patches &&
+	git config --unset-all format.to &&
+	git format-patch -o patches --cover-letter --to "R E Cipient <rcipient@example.com>" main..side >list &&
+	grep "^To: R E Cipient <rcipient@example.com>\$" patches/0000-cover-letter.patch
+'
+
 test_done