diff options
author | Barry Warsaw <barry@python.org> | 2002-09-11 02:32:57 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2002-09-11 02:32:57 (GMT) |
commit | 1a5b9562d62be4fac4bea7b604f4d921f284a817 (patch) | |
tree | 7ec7db03f2e3fba61b25ed8382d83a671fb0730a | |
parent | 4e09d5c6d6f5e3eaf8175c0ec54901b6f7a005a1 (diff) | |
download | cpython-1a5b9562d62be4fac4bea7b604f4d921f284a817.zip cpython-1a5b9562d62be4fac4bea7b604f4d921f284a817.tar.gz cpython-1a5b9562d62be4fac4bea7b604f4d921f284a817.tar.bz2 |
test_quote_unquote(): Added a test for the rfc822.unquote() patch
(adapted from Quinn Dunkan's mimelib SF patch #573204).
-rw-r--r-- | Lib/test/test_rfc822.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_rfc822.py b/Lib/test/test_rfc822.py index 0bdd99a..c450bf9 100644 --- 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) |