diff mbox series

[v2,1/1] t3206-range-diff.sh: cover single-patch case

Message ID 277a4d2bd8bcb20323f0a5a01ccdf431f3c08350.1536762661.git.gitgitgadget@gmail.com (mailing list archive)
State New, archived
Headers show
Series Add coverage for 'git format-patch --range-diff' single-patch case | expand

Commit Message

Elijah Newren via GitGitGadget Sept. 12, 2018, 2:31 p.m. UTC
From: Derrick Stolee <dstolee@microsoft.com>

The commit 40ce4160 "format-patch: allow --range-diff to apply to
a lone-patch" added the ability to see a range-diff as commentary
after the commit message of a single patch series (i.e. [PATCH]
instead of [PATCH X/N]). However, this functionality was not
covered by a test case.

Add a simple test case that checks that a range-diff is written as
commentary to the patch.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
 t/t3206-range-diff.sh | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series


diff --git a/t/t3206-range-diff.sh b/t/t3206-range-diff.sh
index 3d7a2d8a4d..6babc0e276 100755
--- a/t/t3206-range-diff.sh
+++ b/t/t3206-range-diff.sh
@@ -154,4 +154,9 @@  do
+test_expect_success 'format-patch --range-diff as commentary' '
+	git format-patch --stdout --range-diff=HEAD~1 HEAD~1 >actual &&
+	test_i18ngrep "^Range-diff:$" actual