From: Barry Warsaw Date: Mon, 17 Mar 2003 18:36:37 +0000 (+0000) Subject: test_getaddresses_nasty(): A test for mimelib SF bug # 697641. X-Git-Tag: v2.3c1~1444 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ab75840cd07ee41598d3d5cc14dcf49b272664d3;p=thirdparty%2FPython%2Fcpython.git test_getaddresses_nasty(): A test for mimelib SF bug # 697641. --- diff --git a/Lib/email/test/test_email.py b/Lib/email/test/test_email.py index 4bc111a215cb..8950e0d17a71 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()