*** C:\Documents and Settings\tameyer\Local Settings\Temp\test_email.py-revBASE.svn000.tmp.py Sun Sep 10 11:40:40 2006 --- C:\PythonSVN\Lib\email\test\test_email.py Sun Sep 10 11:28:14 2006 *************** *** 2485,2490 **** --- 2485,2506 ---- eq(msg.get('Header'), value1) eq(msg.get('Next-Header'), value2) + def test_line_feed_and_carriage_return_at_8191(self): + fp = openfile(findfile("msg_45.txt")) + try: + data = fp.read().replace("\n", "\r\n") + # This must have a CRLF at 8191, and be followed + # by more headers. Note that 8192 is the amount + # of data read in parser.py, and if that value + # changes, this test will also need to change. + self.assertEqual(data[8191], "\r") + self.assertEqual(data[8192], "\n") + self.assertNotEqual(data[8193], "\n") + msg = email.message_from_string(data) + finally: + fp.close() + self.assertEqual(msg.get_payload(), "Example\r\n") + def test_rfc2822_header_syntax(self): eq = self.assertEqual m = '>From: foo\nFrom: bar\n!"#QUX;~: zoo\n\nbody'