Mercurial > p > roundup > code
comparison test/test_mailsplit.py @ 510:3f6107488465
followup lines directly after a quoted section were being eaten.
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Thu, 10 Jan 2002 06:19:20 +0000 |
| parents | 256776bfdfc5 |
| children | d524e5b52061 54333751e98d |
comparison
equal
deleted
inserted
replaced
| 509:4291a31bfa89 | 510:3f6107488465 |
|---|---|
| 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.9 2002-01-10 06:19:20 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.8 2001/10/28 23:22:28 richard | |
| 127 # fixed bug #474749 ] Indentations lost | |
| 128 # | |
| 114 # Revision 1.7 2001/10/23 00:57:32 richard | 129 # Revision 1.7 2001/10/23 00:57:32 richard |
| 115 # Removed debug print from mailsplit test. | 130 # Removed debug print from mailsplit test. |
| 116 # | 131 # |
| 117 # Revision 1.6 2001/10/21 03:35:13 richard | 132 # Revision 1.6 2001/10/21 03:35:13 richard |
| 118 # bug #473125: Paragraph in e-mails | 133 # bug #473125: Paragraph in e-mails |
