summaryrefslogtreecommitdiffstats
path: root/Lib/email/test/test_email_renamed.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/email/test/test_email_renamed.py')
-rw-r--r--Lib/email/test/test_email_renamed.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/email/test/test_email_renamed.py b/Lib/email/test/test_email_renamed.py
index 4ce2184..4688a1b 100644
--- a/Lib/email/test/test_email_renamed.py
+++ b/Lib/email/test/test_email_renamed.py
@@ -1489,6 +1489,17 @@ counter to RFC 2822, there's no separating newline here
self.failUnless(isinstance(bad.defects[0],
errors.StartBoundaryNotFoundDefect))
+ def test_first_line_is_continuation_header(self):
+ eq = self.assertEqual
+ m = ' Line 1\nLine 2\nLine 3'
+ msg = email.message_from_string(m)
+ eq(msg.keys(), [])
+ eq(msg.get_payload(), 'Line 2\nLine 3')
+ eq(len(msg.defects), 1)
+ self.failUnless(isinstance(msg.defects[0],
+ errors.FirstHeaderLineIsContinuationDefect))
+ eq(msg.defects[0].line, ' Line 1\n')
+
# Test RFC 2047 header encoding and decoding