mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
test_quote_unquote(): Added a test for the rfc822.unquote() patch
(adapted from Quinn Dunkan's mimelib SF patch #573204).
This commit is contained in:
parent
4e09d5c6d6
commit
1a5b9562d6
1 changed files with 6 additions and 0 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue