mirror of
https://github.com/python/cpython.git
synced 2024-11-27 03:45:08 +08:00
test_escape_backslashes(): A test for SF bug #663369 by Matthew Woodcraft.
This commit is contained in:
parent
59e98ae1c5
commit
a2e64702ca
@ -1859,6 +1859,14 @@ class TestMiscellaneous(unittest.TestCase):
|
||||
b = 'person@dom.ain'
|
||||
self.assertEqual(Utils.parseaddr(Utils.formataddr((a, b))), (a, b))
|
||||
|
||||
def test_escape_backslashes(self):
|
||||
self.assertEqual(
|
||||
Utils.formataddr(('Arthur \Backslash\ Foobar', 'person@dom.ain')),
|
||||
r'"Arthur \\Backslash\\ Foobar" <person@dom.ain>')
|
||||
a = r'Arthur \Backslash\ Foobar'
|
||||
b = 'person@dom.ain'
|
||||
self.assertEqual(Utils.parseaddr(Utils.formataddr((a, b))), (a, b))
|
||||
|
||||
def test_name_with_dot(self):
|
||||
x = 'John X. Doe <jxd@example.com>'
|
||||
y = '"John X. Doe" <jxd@example.com>'
|
||||
|
Loading…
Reference in New Issue
Block a user