summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2015-06-10 15:23:14 +0200
committerJulian Andres Klode <jak@debian.org>2015-06-10 15:24:27 +0200
commit4f34ca7de1defc09b119565a35b71e4cca919346 (patch)
treea532676fcfc68e81d4a7e1f11b02837f664022d9 /tests
parent54fb38040f5f314cac9f075685f7e3d77423b7e6 (diff)
downloadpython-apt-4f34ca7de1defc09b119565a35b71e4cca919346.tar.gz
apt.debfile: Fix splitting of multi-lines Binary fields in dsc files
In a multi-line field, a comma might be followed by a newline instead of a space. Closes: #751770
Diffstat (limited to 'tests')
-rw-r--r--tests/data/test_debs/hello_2.5-1.dsc3
-rw-r--r--tests/test_debfile.py4
2 files changed, 4 insertions, 3 deletions
diff --git a/tests/data/test_debs/hello_2.5-1.dsc b/tests/data/test_debs/hello_2.5-1.dsc
index c079f2d3..d00db522 100644
--- a/tests/data/test_debs/hello_2.5-1.dsc
+++ b/tests/data/test_debs/hello_2.5-1.dsc
@@ -3,7 +3,8 @@ Hash: SHA256
Format: 1.0
Source: hello
-Binary: hello
+Binary: hello, bello,
+ cello
Architecture: any
Version: 2.5-1
Maintainer: Santiago Vila <sanvila@debian.org>
diff --git a/tests/test_debfile.py b/tests/test_debfile.py
index b8418e78..eae8038f 100644
--- a/tests/test_debfile.py
+++ b/tests/test_debfile.py
@@ -71,14 +71,14 @@ class TestDebfile(unittest.TestCase):
self.assertEqual(set(deb.missing_deps), missing)
# specialized properties
self.assertEqual(deb.pkgname, "hello")
- self.assertEqual(deb.binaries, ["hello"])
+ self.assertEqual(deb.binaries, ["hello", "bello", "cello"])
self.assertEqual(deb.filelist, ["hello_2.5.orig.tar.gz",
"hello_2.5-1.diff.gz"])
self.assertEqual(deb.depends, [[("autotools-dev", "", "")]])
# tag fields are available as a dict
self.assertEqual(deb["Format"], "1.0")
self.assertEqual(deb["Source"], "hello")
- self.assertEqual(deb["Binary"], "hello")
+ self.assertEqual(deb["Binary"], "hello, bello,\n cello")
self.assertEqual(deb["Architecture"], "any")
self.assertEqual(deb["Version"], "2.5-1")
self.assertEqual(