summaryrefslogtreecommitdiffstats
path: root/Lib/email/test/test_email.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/email/test/test_email.py')
-rw-r--r--Lib/email/test/test_email.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/email/test/test_email.py b/Lib/email/test/test_email.py
index 27ddc7c..2ce2e8c 100644
--- a/Lib/email/test/test_email.py
+++ b/Lib/email/test/test_email.py
@@ -318,6 +318,14 @@ class TestMessageAPI(TestEmailBase):
self.assertEqual(msg.get_param('name', unquote=False),
'"Jim&&Jill"')
+ def test_get_param_with_quotes(self):
+ msg = email.message_from_string(
+ 'Content-Type: foo; bar*0="baz\\"foobar"; bar*1="\\"baz"')
+ self.assertEqual(msg.get_param('bar'), 'baz"foobar"baz')
+ msg = email.message_from_string(
+ "Content-Type: foo; bar*0=\"baz\\\"foobar\"; bar*1=\"\\\"baz\"")
+ self.assertEqual(msg.get_param('bar'), 'baz"foobar"baz')
+
def test_field_containment(self):
unless = self.assertTrue
msg = email.message_from_string('Header: exists')