Changeset 92:d65dd9b7816a
- Timestamp:
- 28/12/09 19:10:33 (2 years ago)
- Author:
- msmits@…
- Branch:
- default
- Message:
-
Handle both types of quoted specials
- Location:
- imapclient
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r91
|
r92
|
|
| 192 | 192 | folder_text = match.group('folder') |
| 193 | 193 | folder_text = folder_text.replace(r'\"', '"') |
| | 194 | folder_text = folder_text.replace(r'\\', '\\') |
| 194 | 195 | if folder_text is not None: |
| 195 | 196 | folders.append(self._decode_folder_name(folder_text)) |
-
|
r91
|
r92
|
|
| 83 | 83 | |
| 84 | 84 | |
| 85 | | def test_escaped_quotes(self): |
| | 85 | def test_quoted_specials(self): |
| 86 | 86 | folders = self.client._proc_folder_list(['(\\HasNoChildren) "/" "Test \"Folder\""', |
| 87 | 87 | '(\\HasNoChildren) "/" "Left\"Right"', |
| | 88 | r'(\\HasNoChildren) "/" "Left\\Right"', |
| 88 | 89 | ]) |
| 89 | | self.assert_(folders == ['Test "Folder"', 'Left\"Right'], 'got %r' % folders) |
| | 90 | self.assert_(folders == ['Test "Folder"', 'Left\"Right', r'Left\Right'], 'got %r' % folders) |
| 90 | 91 | |
| 91 | | |
| 92 | | def test_other_escaping(self): |
| 93 | | self.fail("what other escapes are allowed?") |
| 94 | 92 | |
| 95 | 93 | |