summaryrefslogtreecommitdiffstats
path: root/apps/patchwork/tests
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2008-09-20 10:30:05 +1000
committerJeremy Kerr <jk@ozlabs.org>2008-09-20 10:30:05 +1000
commit5787cddc0bde4514cba96a360f89841e13d2e506 (patch)
tree3d9752044f5b1d64a0dbbf597f4b8dbb039881bc /apps/patchwork/tests
parent26c532d2cfeec0bd4339b5c1db4bb2b3d4a3d3f0 (diff)
downloadpatchwork-5787cddc0bde4514cba96a360f89841e13d2e506.tar.bz2
patchwork-5787cddc0bde4514cba96a360f89841e13d2e506.tar.xz
[parser] Don't remove --- update lines
We'd like to keep update lines in the patch comments, so change the signature-removal code to allow them to pass through. Also, add appropriate tests. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'apps/patchwork/tests')
-rw-r--r--apps/patchwork/tests/patchparser.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/apps/patchwork/tests/patchparser.py b/apps/patchwork/tests/patchparser.py
index 3b10ef5..2e207bf 100644
--- a/apps/patchwork/tests/patchparser.py
+++ b/apps/patchwork/tests/patchparser.py
@@ -102,3 +102,27 @@ class SignatureCommentTest(InlinePatchTest):
'-- \nsig\n' + self.orig_patch)
(self.patch, self.comment) = find_content(self.project, email)
+
+class ListFooterTest(InlinePatchTest):
+ patch_filename = '0001-add-line.patch'
+ test_comment = 'Test comment\nmore comment'
+
+ def setUp(self):
+ self.orig_patch = self.read_patch(self.patch_filename)
+ email = self.create_email( \
+ self.test_comment + '\n' + \
+ '_______________________________________________\n' + \
+ 'Linuxppc-dev mailing list\n' + \
+ self.orig_patch)
+ (self.patch, self.comment) = find_content(self.project, email)
+
+
+class UpdateCommentTest(InlinePatchTest):
+ """ Test for '---\nUpdate: v2' style comments to patches. """
+ patch_filename = '0001-add-line.patch'
+ test_comment = 'Test comment\nmore comment\n---\nUpdate: test update'
+
+class UpdateSigCommentTest(SignatureCommentTest):
+ """ Test for '---\nUpdate: v2' style comments to patches, with a sig """
+ patch_filename = '0001-add-line.patch'
+ test_comment = 'Test comment\nmore comment\n---\nUpdate: test update'