summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/component/rpm/test_import_srpm.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/component/rpm/test_import_srpm.py b/tests/component/rpm/test_import_srpm.py
index 6659d369..5515707e 100644
--- a/tests/component/rpm/test_import_srpm.py
+++ b/tests/component/rpm/test_import_srpm.py
@@ -113,6 +113,20 @@ class TestImportPacked(ComponentTestBase):
# Only one commit: packaging files
eq_(len(repo.get_commits()), 1)
+ def test_import_compressed_patches(self):
+ """Test importing of non-native src.rpm with compressed patches"""
+ srpm = os.path.join(DATA_DIR, 'gbp-test-1.1-2.src.rpm')
+ eq_(import_srpm(['arg0', srpm]), 0)
+ # Check repository state
+ repo = GitRepository('gbp-test')
+ files = set(['Makefile', 'README', 'AUTHORS', 'NEWS', 'bar.tar.gz',
+ 'dummy.sh', 'foo.txt', 'gbp-test.spec', 'my.patch',
+ 'mydir/myfile.txt'])
+ self._check_repo_state(repo, 'master', ['master', 'upstream'], files)
+ # Four commits: upstream, packaging files, three patches and the removal
+ # of imported patches
+ eq_(len(repo.get_commits()), 6)
+
def test_multiple_versions(self):
"""Test importing of multiple versions"""
srpms = [ os.path.join(DATA_DIR, 'gbp-test-1.0-1.src.rpm'),