Skip to content

Commit

Permalink
tests: Add tests for missing format-patch long options
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
bebarino authored and gitster committed May 16, 2009
1 parent ca156cf commit f044fe2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
11 changes: 11 additions & 0 deletions t/t4014-format-patch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -505,4 +505,15 @@ test_expect_success 'format-patch from a subdirectory (3)' '
test -f "$basename"
'

test_expect_success 'format-patch --in-reply-to' '
git format-patch -1 --stdout --in-reply-to "[email protected]" > patch8 &&
grep "^In-Reply-To: <[email protected]>" patch8 &&
grep "^References: <[email protected]>" patch8
'

test_expect_success 'format-patch --signoff' '
git format-patch -1 --signoff --stdout |
grep "^Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>"
'

test_done
6 changes: 6 additions & 0 deletions t/t4021-format-patch-numbered.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,10 @@ test_expect_success 'format.numbered = auto && --no-numbered' '
'

test_expect_success '--start-number && --numbered' '
git format-patch --start-number 3 --numbered --stdout HEAD~1 > patch8 &&
grep "^Subject: \[PATCH 3/3\]" patch8
'

test_done

0 comments on commit f044fe2

Please sign in to comment.