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 | |
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')
-rw-r--r-- | tests/13_test_gbp_pq.py | 9 | ||||
-rw-r--r-- | tests/component/rpm/test_pq_rpm.py | 2 |
2 files changed, 10 insertions, 1 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')) diff --git a/tests/component/rpm/test_pq_rpm.py b/tests/component/rpm/test_pq_rpm.py index 114e6507..15b6d89f 100644 --- a/tests/component/rpm/test_pq_rpm.py +++ b/tests/component/rpm/test_pq_rpm.py @@ -109,7 +109,7 @@ class TestPqRpm(RpmRepoTestBase): # Import eq_(mock_pq(['import']), 0) files = ['dummy.sh', 'Makefile', 'README', 'mydir/myfile.txt'] - patches = ['packaging/0001-My-modification.patch', 'my.patch'] + patches = ['packaging/0001-PATCH-My-modification.patch', 'my.patch'] self._check_repo_state(repo, 'patch-queue/master-orphan', branches, files) |