summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2003-03-06 20:31:02 (GMT)
committerBarry Warsaw <barry@python.org>2003-03-06 20:31:02 (GMT)
commitf0d35856691bcee72f64e028959ee8f602fbff08 (patch)
tree031bddcfbd1e0c78b4469ea8a809cfa3848426f4 /Lib
parent4922768d02b1117f71d4440da4d57da487f26d54 (diff)
downloadcpython-f0d35856691bcee72f64e028959ee8f602fbff08.zip
cpython-f0d35856691bcee72f64e028959ee8f602fbff08.tar.gz
cpython-f0d35856691bcee72f64e028959ee8f602fbff08.tar.bz2
test_long_received_header(): Another test case for folding long
Received headers (first on semis then on whitespace), given by Jason Mastaler.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/email/test/test_email.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/Lib/email/test/test_email.py b/Lib/email/test/test_email.py
index 50287af..86ebaa5 100644
--- a/Lib/email/test/test_email.py
+++ b/Lib/email/test/test_email.py
@@ -765,6 +765,21 @@ This is an example of string which has almost the limit of header length.
=?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