From cfb426984880d98b2398b00848488bad5ec06af8 Mon Sep 17 00:00:00 2001 From: "msmits@ubuntu.ubuntu-domain" Date: Mon, 28 Dec 2009 13:01:43 -0600 Subject: [PATCH] Added a (failing) test as a reminder about quoted specials (as per #28) --- imapclient/test/test_response_parser.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/imapclient/test/test_response_parser.py b/imapclient/test/test_response_parser.py index 301e8aa..19766e3 100644 --- a/imapclient/test/test_response_parser.py +++ b/imapclient/test/test_response_parser.py @@ -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 -- 2.43.0