diff options
author | Guido Günther <agx@sigxcpu.org> | 2018-05-21 13:27:58 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2018-08-24 08:43:59 +0200 |
commit | 2320ac35f9582aee1542e420ca3f227dc1a6caab (patch) | |
tree | 6847b4731b73c32cbc18f91edc3a9c7454762af3 /tests/08_test_patch.py | |
parent | 03accd298de99757077bf72f8d6f3b76a6b3f6a7 (diff) |
Add test case for conversion of extra DEP-3 headers to pseudo-headers
Currently the extra DEP-3 headers may end up as trailers instead of
should be pseudo-headers.
Diffstat (limited to 'tests/08_test_patch.py')
-rw-r--r-- | tests/08_test_patch.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/08_test_patch.py b/tests/08_test_patch.py index 3ed16eba..ff1760cb 100644 --- a/tests/08_test_patch.py +++ b/tests/08_test_patch.py @@ -52,3 +52,18 @@ class TestDep3Patch(unittest.TestCase): self.assertEqual("Roland Rosenfeld", p.author) self.assertEqual("roland@debian.org", p.email) self.assertEqual("", p.long_desc) + + def test_pseudo_headers(self): + """Convert extra DEP-3 header into a git pseudo-header""" + patchfile = os.path.join(self.data_dir, "dep3-longdesc-bug.patch") + self.assertTrue(os.path.exists(patchfile)) + p = Dep3Patch(patchfile) + self.assertEqual('Summary', p.subject) + self.assertEqual("Ben Hutchings", p.author) + self.assertEqual("ben@decadent.org.uk", p.email) + self.assertEqual("""\ +Bug: https://bugs.example.org/123456 + +Long description +""", + p.long_desc) |