Skip to content

Commit ab75840

Browse files
committed
test_getaddresses_nasty(): A test for mimelib SF bug # 697641.
1 parent fa348c8 commit ab75840

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

Lib/email/test/test_email.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1926,6 +1926,16 @@ def test_getaddresses(self):
19261926
[('Al Person', 'aperson@dom.ain'),
19271927
('Bud Person', 'bperson@dom.ain')])
19281928

1929+
def test_getaddresses_nasty(self):
1930+
eq = self.assertEqual
1931+
eq(Utils.getaddresses(['foo: ;']), [('', '')])
1932+
eq(Utils.getaddresses(
1933+
['[]*-- =~$']),
1934+
[('', ''), ('', ''), ('', '*--')])
1935+
eq(Utils.getaddresses(
1936+
['foo: ;', '"Jason R. Mastaler" <jason@dom.ain>']),
1937+
[('', ''), ('Jason R. Mastaler', 'jason@dom.ain')])
1938+
19291939
def test_utils_quote_unquote(self):
19301940
eq = self.assertEqual
19311941
msg = Message()

0 commit comments

Comments
 (0)