summaryrefslogtreecommitdiffhomepage
path: root/tests/component
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2017-11-10 07:42:05 +0100
committerGuido Günther <agx@sigxcpu.org>2017-11-10 07:53:51 +0100
commitd9fb2dfff4cfa94262d8def5ccd501a1fe4478a5 (patch)
tree763b8fcde9f5782dc39fd17d5f7728d57eee1d22 /tests/component
parent8a8bf54ea033230a780169700dcf8dc1ea2f1f6b (diff)
import-dsc: Apply filters on debian tarballs too
Closes: #881311
Diffstat (limited to 'tests/component')
-rw-r--r--tests/component/deb/test_import_dsc.py20
1 files changed, 19 insertions, 1 deletions
diff --git a/tests/component/deb/test_import_dsc.py b/tests/component/deb/test_import_dsc.py
index 9a91f14f..b0a6218a 100644
--- a/tests/component/deb/test_import_dsc.py
+++ b/tests/component/deb/test_import_dsc.py
@@ -1,6 +1,6 @@
# vim: set fileencoding=utf-8 :
#
-# (C) 2013,2014,2015 Guido Günther <agx@sigxcpu.org>
+# (C) 2013,2014,2015,2017 Guido Günther <agx@sigxcpu.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -349,3 +349,21 @@ class TestImportDsc(ComponentTestBase):
self._check_repo_state(repo, 'debian', ['debian', 'master'])
commits, expected = len(repo.get_commits()), 2
ok_(commits == expected, "Found %d commit instead of %d" % (commits, expected))
+
+ def test_import_30_filters(self):
+ dscfile = self._dsc30('2.6-1')
+ assert import_dsc(['arg0',
+ '--verbose',
+ '--no-pristine-tar',
+ '--debian-branch=master',
+ '--upstream-branch=upstream',
+ '--filter=debian/patches/*',
+ '--filter=AUTHORS',
+ dscfile]) == 0
+ repo = ComponentTestGitRepository('hello-debhelper')
+ self._check_repo_state(repo, 'master', ['master', 'upstream'])
+ os.chdir('hello-debhelper')
+ ok_(os.path.exists("./debian/changelog"))
+ ok_(os.path.exists("./configure.ac"))
+ ok_(not os.path.exists("./debian/patches/series"))
+ ok_(not os.path.exists("./debian/patches/AUTHORS"))