mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
Tokio Kikuchi's fix for SF bug #1629369; folding whitespace allowed in the
display name of an email address, e.g. Foo \tBar <foo@example.com> Test case added by Barry.
This commit is contained in:
parent
071d1ae136
commit
cbbc3f19c1
3 changed files with 17 additions and 4 deletions
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (C) 2001-2006 Python Software Foundation
|
||||
# Copyright (C) 2001-2007 Python Software Foundation
|
||||
# Contact: email-sig@python.org
|
||||
# email package unit tests
|
||||
|
||||
|
|
@ -2165,6 +2165,12 @@ class TestMiscellaneous(TestEmailBase):
|
|||
# formataddr() quotes the name if there's a dot in it
|
||||
self.assertEqual(Utils.formataddr((a, b)), y)
|
||||
|
||||
def test_multiline_from_comment(self):
|
||||
x = """\
|
||||
Foo
|
||||
\tBar <foo@example.com>"""
|
||||
self.assertEqual(Utils.parseaddr(x), ('Foo Bar', 'foo@example.com'))
|
||||
|
||||
def test_quote_dump(self):
|
||||
self.assertEqual(
|
||||
Utils.formataddr(('A Silly; Person', 'person@dom.ain')),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue