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

bwarsaw@users.sourceforge.net bwarsaw@users.sourceforge.net
Mon, 03 Mar 2003 07:40:33 -0800


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

Modified Files:
      Tag: folding-reimpl-branch
	test_email.py 
Log Message:
test_whitespace_eater(): Test for complaint in SF patch #585600.


Index: test_email.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/email/test/test_email.py,v
retrieving revision 1.29.4.2
retrieving revision 1.29.4.3
diff -C2 -d -r1.29.4.2 -r1.29.4.3
*** test_email.py	3 Mar 2003 07:00:01 -0000	1.29.4.2
--- test_email.py	3 Mar 2003 15:40:28 -0000	1.29.4.3
***************
*** 2361,2364 ****
--- 2361,2373 ----
          eq(h.encode(), s)
  
+     def test_whitespace_eater(self):
+         eq = self.assertEqual
+         s = 'Subject: =?koi8-r?b?8NLP18XSy8EgzsEgxsnOwczYztk=?= =?koi8-r?q?=CA?= zz.'
+         parts = decode_header(s)
+         eq(parts, [('Subject:', None), ('\xf0\xd2\xcf\xd7\xc5\xd2\xcb\xc1 \xce\xc1 \xc6\xc9\xce\xc1\xcc\xd8\xce\xd9\xca', 'koi8-r'), ('zz.', None)])
+         hdr = make_header(parts)
+         eq(hdr.encode(),
+            'Subject: =?koi8-r?b?8NLP18XSy8EgzsEgxsnOwczYztnK?= zz.')
+