mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
parent
7e4b9057b3
commit
155ceaa454
4 changed files with 29 additions and 1 deletions
|
|
@ -3389,6 +3389,12 @@ class TestFeedParsers(TestEmailBase):
|
|||
feedparser.feed(chunk)
|
||||
return feedparser.close()
|
||||
|
||||
def test_empty_header_name_handled(self):
|
||||
# Issue 19996
|
||||
msg = self.parse("First: val\n: bad\nSecond: val")
|
||||
self.assertEqual(msg['First'], 'val')
|
||||
self.assertEqual(msg['Second'], 'val')
|
||||
|
||||
def test_newlines(self):
|
||||
m = self.parse(['a:\nb:\rc:\r\nd:\n'])
|
||||
self.assertEqual(m.keys(), ['a', 'b', 'c', 'd'])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue