diff options
author | Barry Warsaw <barry@python.org> | 2003-03-10 19:18:34 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2003-03-10 19:18:34 (GMT) |
commit | a2e64702ca3e5d04c1b65c11bb9fdda32720809a (patch) | |
tree | a28a4b8468edd861dfd57cdf544dd787e1a7aa42 /Lib/email/test/test_email.py | |
parent | 59e98ae1c5b59ff7636f52780dd6018b11dfe391 (diff) | |
download | cpython-a2e64702ca3e5d04c1b65c11bb9fdda32720809a.zip cpython-a2e64702ca3e5d04c1b65c11bb9fdda32720809a.tar.gz cpython-a2e64702ca3e5d04c1b65c11bb9fdda32720809a.tar.bz2 |
test_escape_backslashes(): A test for SF bug #663369 by Matthew Woodcraft.
Diffstat (limited to 'Lib/email/test/test_email.py')
-rw-r--r-- | Lib/email/test/test_email.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/email/test/test_email.py b/Lib/email/test/test_email.py index 3c382cb..317e08a 100644 --- a/Lib/email/test/test_email.py +++ b/Lib/email/test/test_email.py @@ -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>' |