summaryrefslogtreecommitdiffstats
path: root/Lib/email
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2003-03-06 06:38:29 (GMT)
committerBarry Warsaw <barry@python.org>2003-03-06 06:38:29 (GMT)
commit28ffcb6f843839293d282fbc86fca1b614a7dfe5 (patch)
tree9b7d23e062bbef3bf24776dd753d16e830e8cb40 /Lib/email
parent671c3e6373fe89618245e9030e4a4b7c217551f3 (diff)
downloadcpython-28ffcb6f843839293d282fbc86fca1b614a7dfe5.zip
cpython-28ffcb6f843839293d282fbc86fca1b614a7dfe5.tar.gz
cpython-28ffcb6f843839293d282fbc86fca1b614a7dfe5.tar.bz2
test_rfc2047_multiline(): Test case for SF bug #640110.
Diffstat (limited to 'Lib/email')
-rw-r--r--Lib/email/test/test_email.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/Lib/email/test/test_email.py b/Lib/email/test/test_email.py
index 0ffc957..542ddcd 100644
--- a/Lib/email/test/test_email.py
+++ b/Lib/email/test/test_email.py
@@ -1193,6 +1193,20 @@ class TestRFC2047(unittest.TestCase):
eq(Utils.encode(s2, charset='iso-8859-2', encoding='b'),
'=?iso-8859-2?b?dSB1bmRlcnN0YW5kIHRoZSBleGFtcGxlLg==?=')
+ def test_rfc2047_multiline(self):
+ eq = self.assertEqual
+ s = """Re: =?mac-iceland?q?r=8Aksm=9Arg=8Cs?= baz
+ foo bar =?mac-iceland?q?r=8Aksm=9Arg=8Cs?="""
+ dh = decode_header(s)
+ eq(dh, [
+ ('Re:', None),
+ ('r\x8aksm\x9arg\x8cs', 'mac-iceland'),
+ ('baz foo bar', None),
+ ('r\x8aksm\x9arg\x8cs', 'mac-iceland')])
+ eq(str(make_header(dh)),
+ """Re: =?mac-iceland?q?r=8Aksm=9Arg=8Cs?= baz foo bar
+ =?mac-iceland?q?r=8Aksm=9Arg=8Cs?=""")
+
# Test the MIMEMessage class