diff options
author | R David Murray <rdmurray@bitdance.com> | 2011-04-08 00:54:03 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2011-04-08 00:54:03 (GMT) |
commit | e1292a25d8a063dcc97111cd2b0239dc1aef5aa2 (patch) | |
tree | 0d68cb6cb3d2207cf5d52f87b017f02939cb4c37 /Lib/email/test | |
parent | 7da4db118e7899a64ef3b315f63c37ec0dbd2253 (diff) | |
download | cpython-e1292a25d8a063dcc97111cd2b0239dc1aef5aa2.zip cpython-e1292a25d8a063dcc97111cd2b0239dc1aef5aa2.tar.gz cpython-e1292a25d8a063dcc97111cd2b0239dc1aef5aa2.tar.bz2 |
#11492: fix header truncation on folding when there are runs of split chars.
Not a complete fix for this issue.
Diffstat (limited to 'Lib/email/test')
-rw-r--r-- | Lib/email/test/test_email.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/email/test/test_email.py b/Lib/email/test/test_email.py index 5b8b7bf..e06c461 100644 --- a/Lib/email/test/test_email.py +++ b/Lib/email/test/test_email.py @@ -793,6 +793,16 @@ Subject: the first part of this is short, ; this_part_does_not_fit_within_maxlinelen_and_thus_should_be_on_a_line_all_by_itself;""") + def test_long_header_with_multiple_sequential_split_chars(self): + # Issue 11492 + + eq = self.ndiffAssertEqual + h = Header('This is a long line that has two whitespaces in a row. ' + 'This used to cause truncation of the header when folded') + eq(h.encode(), """\ +This is a long line that has two whitespaces in a row. This used to cause + truncation of the header when folded""") + def test_no_split_long_header(self): eq = self.ndiffAssertEqual hstr = 'References: ' + 'x' * 80 |