t3206-range-diff.sh: cover single-patch case
authorDerrick Stolee <dstolee@microsoft.com>
Wed, 12 Sep 2018 14:31:03 +0000 (07:31 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 12 Sep 2018 17:17:42 +0000 (10:17 -0700)
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>
t/t3206-range-diff.sh
index 3d7a2d8a4d8191f93a70b2e3d4878537cd2c5564..6babc0e27673eb50cc3d55ed1dae3aedcd1b7161 100755 (executable)
@@ -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