diff options
author | Guido Günther <agx@sigxcpu.org> | 2017-08-31 13:30:18 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2017-08-31 13:50:46 +0200 |
commit | b2092c1e2c9a25d2a480c75e4cfb42235f86a0e8 (patch) | |
tree | 7e0b26fc7126df6ae822217a913b5549d98c9bde /tests/13_test_gbp_pq.py | |
parent | 2ca3e379bf8e6bbf1cb76bdf36259e395e03092a (diff) |
patch_series: don't let "git mailinfo" sanitize the subject
This would strip away text in []. This improves the import/export round
trip.
Closes: #872354
Diffstat (limited to 'tests/13_test_gbp_pq.py')
-rw-r--r-- | tests/13_test_gbp_pq.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/13_test_gbp_pq.py b/tests/13_test_gbp_pq.py index b9a373a0..5cb00c52 100644 --- a/tests/13_test_gbp_pq.py +++ b/tests/13_test_gbp_pq.py @@ -50,6 +50,15 @@ class TestApplyAndCommit(testutils.DebianGitTestRepo): pq.apply_and_commit_patch(self.repo, patch, None) self.assertIn(b'foo', self.repo.list_files()) + def test_apply_and_commit_patch_preserve_subject(self): + """Test applying a patch preserves the subject""" + patch = gbp.patch_series.Patch(_patch_path('brackets-in-subject.patch')) + + pq.apply_and_commit_patch(self.repo, patch, None) + self.assertIn(b'foo', self.repo.list_files()) + info = self.repo.get_commit_info('HEAD') + self.assertEquals('[text] foobar', info['subject']) + def test_topic(self): """Test if setting a topic works""" patch = gbp.patch_series.Patch(_patch_path('foo.patch')) |