From: Barry Warsaw Date: Wed, 11 Sep 2002 02:32:57 +0000 (+0000) Subject: test_quote_unquote(): Added a test for the rfc822.unquote() patch X-Git-Tag: v2.3c1~4140 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1a5b9562d62be4fac4bea7b604f4d921f284a817;p=thirdparty%2FPython%2Fcpython.git test_quote_unquote(): Added a test for the rfc822.unquote() patch (adapted from Quinn Dunkan's mimelib SF patch #573204). --- diff --git a/Lib/test/test_rfc822.py b/Lib/test/test_rfc822.py index 0bdd99afb37c..c450bf97ce09 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 '), ('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)