summaryrefslogtreecommitdiffstats
path: root/Lib/email/test/test_email.py
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2003-03-17 18:36:37 (GMT)
committerBarry Warsaw <barry@python.org>2003-03-17 18:36:37 (GMT)
commitab75840cd07ee41598d3d5cc14dcf49b272664d3 (patch)
tree3c6fc9afe2e1a4f796b8c1aa6f9596e87c54ab2b /Lib/email/test/test_email.py
parentfa348c876f990c16e7f9057358765f34396e7d76 (diff)
downloadcpython-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.py10
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()