diff options
author | Barry Warsaw <barry@python.org> | 2003-03-17 18:36:37 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2003-03-17 18:36:37 (GMT) |
commit | ab75840cd07ee41598d3d5cc14dcf49b272664d3 (patch) | |
tree | 3c6fc9afe2e1a4f796b8c1aa6f9596e87c54ab2b /Lib/email/test/test_email.py | |
parent | fa348c876f990c16e7f9057358765f34396e7d76 (diff) | |
download | cpython-ab75840cd07ee41598d3d5cc14dcf49b272664d3.zip cpython-ab75840cd07ee41598d3d5cc14dcf49b272664d3.tar.gz cpython-ab75840cd07ee41598d3d5cc14dcf49b272664d3.tar.bz2 |
test_getaddresses_nasty(): A test for mimelib SF bug # 697641.
Diffstat (limited to 'Lib/email/test/test_email.py')
-rw-r--r-- | Lib/email/test/test_email.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/email/test/test_email.py b/Lib/email/test/test_email.py index 4bc111a..8950e0d 100644 --- a/Lib/email/test/test_email.py +++ b/Lib/email/test/test_email.py @@ -1926,6 +1926,16 @@ class TestMiscellaneous(unittest.TestCase): [('Al Person', 'aperson@dom.ain'), ('Bud Person', 'bperson@dom.ain')]) + def test_getaddresses_nasty(self): + eq = self.assertEqual + eq(Utils.getaddresses(['foo: ;']), [('', '')]) + eq(Utils.getaddresses( + ['[]*-- =~$']), + [('', ''), ('', ''), ('', '*--')]) + eq(Utils.getaddresses( + ['foo: ;', '"Jason R. Mastaler" <jason@dom.ain>']), + [('', ''), ('Jason R. Mastaler', 'jason@dom.ain')]) + def test_utils_quote_unquote(self): eq = self.assertEqual msg = Message() |