From 4f34ca7de1defc09b119565a35b71e4cca919346 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Wed, 10 Jun 2015 15:23:14 +0200 Subject: 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 --- tests/data/test_debs/hello_2.5-1.dsc | 3 ++- tests/test_debfile.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'tests') 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 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( -- cgit v1.2.3