summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_rfc822.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_rfc822.py')
-rw-r--r--Lib/test/test_rfc822.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_rfc822.py b/Lib/test/test_rfc822.py
index 0d9f28a..6d22825 100644
--- a/Lib/test/test_rfc822.py
+++ b/Lib/test/test_rfc822.py
@@ -45,6 +45,10 @@ class MessageTestCase(unittest.TestCase):
print 'extra parsed address:', repr(n), repr(a)
continue
i = i + 1
+ self.assertEqual(mn, n,
+ "Un-expected name: %s != %s" % (`mn`, `n`))
+ self.assertEqual(ma, a,
+ "Un-expected address: %s != %s" % (`ma`, `a`))
if mn == n and ma == a:
pass
else:
@@ -129,6 +133,12 @@ class MessageTestCase(unittest.TestCase):
'To: person@dom.ain (User J. Person)\n\n',
[('User J. Person', 'person@dom.ain')])
+ def test_doublecomment(self):
+ # The RFC allows comments within comments in an email addr
+ self.check(
+ 'To: person@dom.ain ((User J. Person)), John Doe <foo@bar.com>\n\n',
+ [('User J. Person', 'person@dom.ain'), ('John Doe', 'foo@bar.com')])
+
def test_twisted(self):
# This one is just twisted. I don't know what the proper
# result should be, but it shouldn't be to infloop, which is