From ab75840cd07ee41598d3d5cc14dcf49b272664d3 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Mon, 17 Mar 2003 18:36:37 +0000 Subject: test_getaddresses_nasty(): A test for mimelib SF bug # 697641. --- Lib/email/test/test_email.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Lib/email/test/test_email.py b/Lib/email/test/test_email.py index 4bc111a215..8950e0d17a 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 R. Mastaler', 'jason@dom.ain')]) + def test_utils_quote_unquote(self): eq = self.assertEqual msg = Message() -- cgit v1.2.1