summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerrick Stolee <dstolee@microsoft.com>2018-09-12 14:31:03 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-09-12 17:17:42 (GMT)
commitcdc067c3197f659470591c1d5614cf9221a43c98 (patch)
treeb71d1137a61a17cc997779e0cf110cf7b7f974e1
parent40ce41604daf200cdc85abded0133d40faafc2f8 (diff)
downloadgit-cdc067c3197f659470591c1d5614cf9221a43c98.zip
git-cdc067c3197f659470591c1d5614cf9221a43c98.tar.gz
git-cdc067c3197f659470591c1d5614cf9221a43c98.tar.bz2
t3206-range-diff.sh: cover single-patch case
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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xt/t3206-range-diff.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/t/t3206-range-diff.sh b/t/t3206-range-diff.sh
index 3d7a2d8..6babc0e 100755
--- a/t/t3206-range-diff.sh
+++ b/t/t3206-range-diff.sh
@@ -154,4 +154,9 @@ do
'
done
+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
+'
+
test_done