projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4e09d5c
)
test_quote_unquote(): Added a test for the rfc822.unquote() patch
author
Barry Warsaw
<barry@python.org>
Wed, 11 Sep 2002 02:32:57 +0000
(
02:32
+0000)
committer
Barry Warsaw
<barry@python.org>
Wed, 11 Sep 2002 02:32:57 +0000
(
02:32
+0000)
(adapted from Quinn Dunkan's mimelib SF patch #573204).
Lib/test/test_rfc822.py
patch
|
blob
|
history
diff --git
a/Lib/test/test_rfc822.py
b/Lib/test/test_rfc822.py
index 0bdd99afb37c0b8e210e926473ef7def9f76e14d..c450bf97ce09e4a37747a8920cafee5bd59d14bb 100644
(file)
--- a/
Lib/test/test_rfc822.py
+++ b/
Lib/test/test_rfc822.py
@@
-222,6
+222,12
@@
A test message.
eq(rfc822.parseaddr('Cynthia Person <cperson@dom.ain>'),
('Cynthia Person', 'cperson@dom.ain'))
+ def test_quote_unquote(self):
+ eq = self.assertEqual
+ eq(rfc822.quote('foo\\wacky"name'), 'foo\\\\wacky\\"name')
+ eq(rfc822.unquote('"foo\\\\wacky\\"name"'), 'foo\\wacky"name')
+
+
def test_main():
test_support.run_unittest(MessageTestCase)