mbox = utils.patch_to_mbox(self.patch)
self.assertIn('Acked-by: 1\nAcked-by: 2\n', mbox)
+ def test_bug_516(self):
+ """Test that tags are appended if a patch description is unset."""
+ patch = create_patch(
+ content=(
+ '---\n'
+ ' manual/string.texi | 2 +-\n'
+ ' 1 file changed, 1 insertion(+), 1 deletion(-)'
+ ),
+ )
+ create_patch_comment(patch=patch, content='Acked-by: 2\n')
+
+ mbox = utils.patch_to_mbox(patch)
+ # the epilog comes after the tags
+ self.assertIn(
+ (
+ 'Acked-by: 2\n'
+ '---\n'
+ ' manual/string.texi | 2 +-\n'
+ ' 1 file changed, 1 insertion(+), 1 deletion(-)\n'
+ ),
+ mbox,
+ )
+
def _test_header_passthrough(self, header):
patch = create_patch(headers=header + '\n')
mbox = utils.patch_to_mbox(patch)
"""
is_patch = isinstance(submission, Patch)
- postscript_re = re.compile('\n-{2,3} ?\n')
+ postscript_re = re.compile('^-{2,3} ?$', re.MULTILINE)
body = ''
if submission.content:
body += comment.patch_responses
if postscript:
- body += '---\n' + postscript + '\n'
+ body += '---' + postscript + '\n'
if is_patch and submission.diff:
body += '\n' + submission.diff