[Python-checkins] python/dist/src/Lib/email/test test_email.py,1.45,1.46

bwarsaw@users.sourceforge.net bwarsaw@users.sourceforge.net
Mon, 17 Mar 2003 10:36:40 -0800


Update of /cvsroot/python/python/dist/src/Lib/email/test
In directory sc8-pr-cvs1:/tmp/cvs-serv29965

Modified Files:
	test_email.py 
Log Message:
test_getaddresses_nasty(): A test for mimelib SF bug # 697641.


Index: test_email.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/email/test/test_email.py,v
retrieving revision 1.45
retrieving revision 1.46
diff -C2 -d -r1.45 -r1.46
*** test_email.py	12 Mar 2003 03:14:11 -0000	1.45
--- test_email.py	17 Mar 2003 18:36:37 -0000	1.46
***************
*** 1927,1930 ****
--- 1927,1940 ----
              ('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