patman: add warning for invalid tag

Add a error in patman tool when the commit message contents an invalid
tag "Serie-.*" instead of "Series-.*".

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Patrick Delaunay 2021-07-22 16:51:42 +02:00 committed by Simon Glass
parent b29a0dbdc3
commit a6123333ab
2 changed files with 20 additions and 0 deletions

View file

@ -506,6 +506,17 @@ Tested-by: %s
'Reviewed-by': {self.joe, self.mary},
'Tested-by': {self.leb}})
def testInvalidTag(self):
"""Test invalid tag in a patchstream"""
text = '''This is a patch
Serie-version: 2
'''
with self.assertRaises(ValueError) as exc:
pstrm = PatchStream.process_text(text)
self.assertEqual("Line 3: Invalid tag = 'Serie-version: 2'",
str(exc.exception))
def testMissingEnd(self):
"""Test a missing END tag"""
text = '''This is a patch