summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_email/test_headerregistry.py
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2013-07-12 20:01:10 (GMT)
committerR David Murray <rdmurray@bitdance.com>2013-07-12 20:01:10 (GMT)
commit1f9d24a18d96a899dfcb0ce630cbbb78ec2cec7a (patch)
treec830141c0bd52bd4b1c8fb593ee127071caddb63 /Lib/test/test_email/test_headerregistry.py
parentae95b4f7a5344de372885fb25d8fadbb14c8fea4 (diff)
parent923512f327af6944bbdbc905d2372658a3977489 (diff)
downloadcpython-1f9d24a18d96a899dfcb0ce630cbbb78ec2cec7a.zip
cpython-1f9d24a18d96a899dfcb0ce630cbbb78ec2cec7a.tar.gz
cpython-1f9d24a18d96a899dfcb0ce630cbbb78ec2cec7a.tar.bz2
Merge: #18431: Decode encoded words in atoms in new email parser.
Diffstat (limited to 'Lib/test/test_email/test_headerregistry.py')
-rw-r--r--Lib/test/test_email/test_headerregistry.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/Lib/test/test_email/test_headerregistry.py b/Lib/test/test_email/test_headerregistry.py
index 80f1c02..f754a32 100644
--- a/Lib/test/test_email/test_headerregistry.py
+++ b/Lib/test/test_email/test_headerregistry.py
@@ -158,6 +158,10 @@ class TestUnstructuredHeader(TestHeaderBase):
'=?utf-8?q?=C3=89ric?=',
'Éric'),
+ 'rfc2047_quopri_with_regular_text': (
+ 'The =?utf-8?q?=C3=89ric=2C?= Himself',
+ 'The Éric, Himself'),
+
}
@@ -1119,6 +1123,26 @@ class TestAddressHeader(TestHeaderBase):
'example.com',
None),
+ 'rfc2047_atom_is_decoded':
+ ('=?utf-8?q?=C3=89ric?= <foo@example.com>',
+ [],
+ 'Éric <foo@example.com>',
+ 'Éric',
+ 'foo@example.com',
+ 'foo',
+ 'example.com',
+ None),
+
+ 'rfc2047_atom_in_phrase_is_decoded':
+ ('The =?utf-8?q?=C3=89ric=2C?= Himself <foo@example.com>',
+ [],
+ '"The Éric, Himself" <foo@example.com>',
+ 'The Éric, Himself',
+ 'foo@example.com',
+ 'foo',
+ 'example.com',
+ None),
+
}
# XXX: Need many more examples, and in particular some with names in