aboutsummaryrefslogtreecommitdiff
path: root/tests/08_test_patch.py
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2018-12-16 13:21:29 +0100
committerGuido Günther <agx@sigxcpu.org>2018-12-16 13:27:31 +0100
commit55edef25112ad4d42fbb90651d37e3b4862895e1 (patch)
treee2cf14dfa38f4a79e196cc6d291dde9146c53abf /tests/08_test_patch.py
parent5426d03571f37c11da198b5d9f8450b1f1f27cc8 (diff)
PatchSeries: Don't fail if there's only a patch end marker
If the patch only has '---' we pass empty data to git-mail-info otherwise. Thanks: James Cowgill for the detailed report Closes: #916545
Diffstat (limited to 'tests/08_test_patch.py')
-rw-r--r--tests/08_test_patch.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/08_test_patch.py b/tests/08_test_patch.py
index 1567f018..9fe7f7fd 100644
--- a/tests/08_test_patch.py
+++ b/tests/08_test_patch.py
@@ -126,3 +126,14 @@ reproducible build
Author: Alexis Bienvenüe <pado@passoire.fr>
""",
p.long_desc)
+
+
+class TestMarkerOnly(unittest.TestCase):
+ data_dir = os.path.splitext(__file__)[0] + '_data'
+
+ def test_parse(self):
+ """Don't fail on empty patch header"""
+ patchfile = os.path.join(self.data_dir, "916545.patch")
+ self.assertTrue(os.path.exists(patchfile))
+ p = Dep3Patch(patchfile)
+ self.assertEqual("916545", p.subject)