Skip to content

Commit

Permalink
test_rfc2047_multiline(): Test case for SF bug #640110.
Browse files Browse the repository at this point in the history
  • Loading branch information
warsaw committed Mar 6, 2003
1 parent 671c3e6 commit 28ffcb6
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Lib/email/test/test_email.py
Original file line number Diff line number Diff line change
Expand Up @@ -1193,6 +1193,20 @@ def test_encode_header(self):
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
Expand Down

0 comments on commit 28ffcb6

Please sign in to comment.