]> khamidou — GitHub mirrors - imapclient.git/commitdiff
Added a (failing) test as a reminder about quoted specials (as per #28)
authormsmits@ubuntu.ubuntu-domain <msmits@ubuntu.ubuntu-domain>
Mon, 28 Dec 2009 19:01:43 +0000 (13:01 -0600)
committermsmits@ubuntu.ubuntu-domain <msmits@ubuntu.ubuntu-domain>
Mon, 28 Dec 2009 19:01:43 +0000 (13:01 -0600)
imapclient/test/test_response_parser.py

index 301e8aa84e6d1133dc3e6aba20d9a357ba9d09ff..19766e31ac128f40f2362ad0c96cc7b2d6f36d59 100644 (file)
@@ -94,6 +94,11 @@ class TestParseResponse(unittest.TestCase):
         self._test(response, (12, 'foo', literal_text))
 
 
+    def test_quoted_specials(self):
+        self._test(r'"foo \"bar\""', ('foo "bar"',))
+        self._test(r'"foo\\bar"', (r'foo\bar',))
+
+
     def test_incomplete_tuple(self):
         self._test_parse_error('abc (1 2', 'Tuple incomplete before "(1 2"')
 
@@ -106,6 +111,8 @@ class TestParseResponse(unittest.TestCase):
         self._test_parse_error('"abc next', 'No closing quotation: "abc next')
 
 
+
+
     def _test(self, to_parse, expected, wrap=True):
         if wrap:
             # convenience - expected value should be wrapped in another tuple