diff options
Diffstat (limited to 'Lib/email/test/test_email.py')
-rw-r--r-- | Lib/email/test/test_email.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Lib/email/test/test_email.py b/Lib/email/test/test_email.py index e1d0eb7..c7c61ef 100644 --- a/Lib/email/test/test_email.py +++ b/Lib/email/test/test_email.py @@ -1491,6 +1491,18 @@ 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 |