diff options
author | R David Murray <rdmurray@bitdance.com> | 2011-04-08 01:00:33 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2011-04-08 01:00:33 (GMT) |
commit | 7ede59d77a9b21c5c021d1b9a4289aba11509fdd (patch) | |
tree | 940241034ad130417e46590a1a6e0f46ea6cab62 /Lib/test/test_email | |
parent | 63d320b44f3ebd42c6b7762dcb9524378b4b6c64 (diff) | |
parent | 80221ed0c0f3c73ee13c5d2c64a9b0273933a0ce (diff) | |
download | cpython-7ede59d77a9b21c5c021d1b9a4289aba11509fdd.zip cpython-7ede59d77a9b21c5c021d1b9a4289aba11509fdd.tar.gz cpython-7ede59d77a9b21c5c021d1b9a4289aba11509fdd.tar.bz2 |
Merge #11492: fix header truncation on folding when there are runs of split chars.
Not a complete fix for this issue.
Diffstat (limited to 'Lib/test/test_email')
-rw-r--r-- | Lib/test/test_email/test_email.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_email/test_email.py b/Lib/test/test_email/test_email.py index 244de93..404282b 100644 --- a/Lib/test/test_email/test_email.py +++ b/Lib/test/test_email/test_email.py @@ -801,6 +801,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 |