comparison test/test_mailsplit.py @ 602:c242455d9b46 config-0-4-0-branch

Brought the config branch up to date with HEAD
author Richard Jones <richard@users.sourceforge.net>
date Wed, 06 Feb 2002 04:05:55 +0000
parents 256776bfdfc5
children
comparison
equal deleted inserted replaced
601:912029653c1c 602:c242455d9b46
13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS"
15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
17 # 17 #
18 # $Id: test_mailsplit.py,v 1.8 2001-10-28 23:22:28 richard Exp $ 18 # $Id: test_mailsplit.py,v 1.8.2.1 2002-02-06 04:05:55 richard Exp $
19 19
20 import unittest, cStringIO 20 import unittest, cStringIO
21 21
22 from roundup.mailgw import parseContent 22 from roundup.mailgw import parseContent
23 23
87 s = '''testing\n\ntesting\n\ntesting''' 87 s = '''testing\n\ntesting\n\ntesting'''
88 summary, content = parseContent(s) 88 summary, content = parseContent(s)
89 self.assertEqual(summary, 'testing') 89 self.assertEqual(summary, 'testing')
90 self.assertEqual(content, 'testing\n\ntesting\n\ntesting') 90 self.assertEqual(content, 'testing\n\ntesting\n\ntesting')
91 91
92 def testSimpleFollowup(self):
93 s = '''>hello\ntesting'''
94 summary, content = parseContent(s)
95 self.assertEqual(summary, 'testing')
96 self.assertEqual(content, 'testing')
97
98 def testSimpleFollowupParas(self):
99 s = '''>hello\ntesting\n\ntesting\n\ntesting'''
100 summary, content = parseContent(s)
101 self.assertEqual(summary, 'testing')
102 self.assertEqual(content, 'testing\n\ntesting\n\ntesting')
103
92 def testEmpty(self): 104 def testEmpty(self):
93 s = '' 105 s = ''
94 summary, content = parseContent(s) 106 summary, content = parseContent(s)
95 self.assertEqual(summary, '') 107 self.assertEqual(summary, '')
96 self.assertEqual(content, '') 108 self.assertEqual(content, '')
109 return unittest.makeSuite(MailsplitTestCase, 'test') 121 return unittest.makeSuite(MailsplitTestCase, 'test')
110 122
111 123
112 # 124 #
113 # $Log: not supported by cvs2svn $ 125 # $Log: not supported by cvs2svn $
126 # Revision 1.9 2002/01/10 06:19:20 richard
127 # followup lines directly after a quoted section were being eaten.
128 #
129 # Revision 1.8 2001/10/28 23:22:28 richard
130 # fixed bug #474749 ] Indentations lost
131 #
114 # Revision 1.7 2001/10/23 00:57:32 richard 132 # Revision 1.7 2001/10/23 00:57:32 richard
115 # Removed debug print from mailsplit test. 133 # Removed debug print from mailsplit test.
116 # 134 #
117 # Revision 1.6 2001/10/21 03:35:13 richard 135 # Revision 1.6 2001/10/21 03:35:13 richard
118 # bug #473125: Paragraph in e-mails 136 # bug #473125: Paragraph in e-mails

Roundup Issue Tracker: http://roundup-tracker.org/