tests: Add tests for missing format-patch long options
Exercise format-patch's --signoff, --in-reply-to and --start-number long options. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Stephen Boyd committed
May 16, 2009 at 02:24 UTC
f044fe2de6f7bbace158853c075a4065f3722265
2 files changed
+17
t/t4014-format-patch.sh
+11
@@ -505,4 +505,15 @@ test_expect_success 'format-patch from a subdirectory (3)' '
505
test -f "$basename"
506
'
507
508
+test_expect_success 'format-patch --in-reply-to' '
509
+ git format-patch -1 --stdout --in-reply-to "baz@foo.bar" > patch8 &&
510
+ grep "^In-Reply-To: <baz@foo.bar>" patch8 &&
511
+ grep "^References: <baz@foo.bar>" patch8
512
+'
513
+
514
+test_expect_success 'format-patch --signoff' '
515
+ git format-patch -1 --signoff --stdout |
516
+ grep "^Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>"
517
+'
518
+
519
test_done
t/t4021-format-patch-numbered.sh
+6
@@ -108,4 +108,10 @@ test_expect_success 'format.numbered = auto && --no-numbered' '
108
109
'
110
111
+test_expect_success '--start-number && --numbered' '
112
+
113
+ git format-patch --start-number 3 --numbered --stdout HEAD~1 > patch8 &&
114
+ grep "^Subject: \[PATCH 3/3\]" patch8
115
+'
116
+
117
test_done