Skip to content

Commit

Permalink
test_long_received_header(): Another test case for folding long
Browse files Browse the repository at this point in the history
Received headers (first on semis then on whitespace), given by Jason
Mastaler.
  • Loading branch information
warsaw committed Mar 6, 2003
1 parent 4922768 commit f0d3585
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Lib/email/test/test_email.py
Original file line number Diff line number Diff line change
Expand Up @@ -765,6 +765,21 @@ def test_long_field_name(self):
=?iso-8859-1?q?entlang=2C_an_s=FCdl=FCndischen_Wandgem=E4lden_vorbei=2C_g?=
=?iso-8859-1?q?egen_die_rotierenden_Klingen_bef=F6rdert=2E_?=""")

def test_long_received_header(self):
h = 'from FOO.TLD (vizworld.acl.foo.tld [123.452.678.9]) by hrothgar.la.mastaler.com (tmda-ofmipd) with ESMTP; Wed, 05 Mar 2003 18:10:18 -0700'
msg = Message()
msg['Received-1'] = Header(h, continuation_ws='\t')
msg['Received-2'] = h
self.assertEqual(msg.as_string(), """\
Received-1: from FOO.TLD (vizworld.acl.foo.tld [123.452.678.9]) by
hrothgar.la.mastaler.com (tmda-ofmipd) with ESMTP;
Wed, 05 Mar 2003 18:10:18 -0700
Received-2: from FOO.TLD (vizworld.acl.foo.tld [123.452.678.9]) by
hrothgar.la.mastaler.com (tmda-ofmipd) with ESMTP;
Wed, 05 Mar 2003 18:10:18 -0700
""")



# Test mangling of "From " lines in the body of a message
Expand Down

0 comments on commit f0d3585

Please sign in to comment.