Commit 871f18e8 authored by Barry Warsaw's avatar Barry Warsaw

test_getaddresses_nasty(): A test for mimelib SF bug # 697641.

parent adc27cf9
...@@ -1926,6 +1926,16 @@ class TestMiscellaneous(unittest.TestCase): ...@@ -1926,6 +1926,16 @@ class TestMiscellaneous(unittest.TestCase):
[('Al Person', 'aperson@dom.ain'), [('Al Person', 'aperson@dom.ain'),
('Bud Person', 'bperson@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): def test_utils_quote_unquote(self):
eq = self.assertEqual eq = self.assertEqual
msg = Message() msg = Message()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment