summaryrefslogtreecommitdiffstats
path: root/Lib/email
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2002-08-20 12:54:07 (GMT)
committerBarry Warsaw <barry@python.org>2002-08-20 12:54:07 (GMT)
commitb404bb7813f3d05b7d338ff5c1c5dc6c59b946c6 (patch)
tree90b594d3e3d64b3df730b6a381fdc014344a5483 /Lib/email
parentbc4651083e1f8a5c63fa3283670e949322bf4295 (diff)
downloadcpython-b404bb7813f3d05b7d338ff5c1c5dc6c59b946c6.zip
cpython-b404bb7813f3d05b7d338ff5c1c5dc6c59b946c6.tar.gz
cpython-b404bb7813f3d05b7d338ff5c1c5dc6c59b946c6.tar.bz2
test_three_lines(): Test case reported by Andrew McNamara. Works in
email 2.2 but fails in email 1.0.
Diffstat (limited to 'Lib/email')
-rw-r--r--Lib/email/test/test_email.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/email/test/test_email.py b/Lib/email/test/test_email.py
index e4fb8bf..4c84fe1 100644
--- a/Lib/email/test/test_email.py
+++ b/Lib/email/test/test_email.py
@@ -1740,6 +1740,14 @@ Here's the message body
eq(part2a.get_type(), 'text/plain')
neq(part2a.get_payload(), 'message 2\n')
+ def test_three_lines(self):
+ # A bug report by Andrew McNamara
+ lines = ['From: Andrew Person <aperson@dom.ain',
+ 'Subject: Test',
+ 'Date: Tue, 20 Aug 2002 16:43:45 +1000']
+ msg = email.message_from_string(NL.join(lines))
+ self.assertEqual(msg['date'], 'Tue, 20 Aug 2002 16:43:45 +1000')
+
class TestBase64(unittest.TestCase):