diff options
| author | Barry Warsaw <barry@python.org> | 2007-03-12 03:20:01 (GMT) |
|---|---|---|
| committer | Barry Warsaw <barry@python.org> | 2007-03-12 03:20:01 (GMT) |
| commit | cbbc3f19c157a1b464f0faa8a396777040e96c8e (patch) | |
| tree | 84ea284742abbf5abef1c0086a72d2e9ae54a1b0 /Lib/email/test/test_email.py | |
| parent | 071d1ae1362e4444a28c66d9e49e36776efdd3a3 (diff) | |
| download | cpython-cbbc3f19c157a1b464f0faa8a396777040e96c8e.zip cpython-cbbc3f19c157a1b464f0faa8a396777040e96c8e.tar.gz cpython-cbbc3f19c157a1b464f0faa8a396777040e96c8e.tar.bz2 | |
Tokio Kikuchi's fix for SF bug #1629369; folding whitespace allowed in the
display name of an email address, e.g.
Foo
\tBar <foo@example.com>
Test case added by Barry.
Diffstat (limited to 'Lib/email/test/test_email.py')
| -rw-r--r-- | Lib/email/test/test_email.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Lib/email/test/test_email.py b/Lib/email/test/test_email.py index 13801dc..eb2a73c 100644 --- a/Lib/email/test/test_email.py +++ b/Lib/email/test/test_email.py @@ -1,4 +1,4 @@ -# Copyright (C) 2001-2006 Python Software Foundation +# Copyright (C) 2001-2007 Python Software Foundation # Contact: email-sig@python.org # email package unit tests @@ -2165,6 +2165,12 @@ class TestMiscellaneous(TestEmailBase): # formataddr() quotes the name if there's a dot in it self.assertEqual(Utils.formataddr((a, b)), y) + def test_multiline_from_comment(self): + x = """\ +Foo +\tBar <foo@example.com>""" + self.assertEqual(Utils.parseaddr(x), ('Foo Bar', 'foo@example.com')) + def test_quote_dump(self): self.assertEqual( Utils.formataddr(('A Silly; Person', 'person@dom.ain')), |
