Skip to content

Commit f044fe2

Browse files
bebarinogitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ca156cf commit f044fe2

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

t/t4014-format-patch.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,4 +505,15 @@ test_expect_success 'format-patch from a subdirectory (3)' '
505505
test -f "$basename"
506506
'
507507

508+
test_expect_success 'format-patch --in-reply-to' '
509+
git format-patch -1 --stdout --in-reply-to "[email protected]" > patch8 &&
510+
grep "^In-Reply-To: <[email protected]>" patch8 &&
511+
grep "^References: <[email protected]>" 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+
508519
test_done

t/t4021-format-patch-numbered.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,4 +108,10 @@ test_expect_success 'format.numbered = auto && --no-numbered' '
108108
109109
'
110110

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+
111117
test_done

0 commit comments

Comments
 (0)