Check if quoting is self-consistent among mkdir and cd.
(self)
| 257 | self.assertEqual(len(params.shared_folder_cache), len(exported['shared_folders'])) |
| 258 | |
| 259 | def test_quoting(self): |
| 260 | """Check if quoting is self-consistent among mkdir and cd.""" |
| 261 | params = TestConnectedCommands.params |
| 262 | with mock.patch('builtins.input', side_effect=KeyboardInterrupt()), mock.patch('builtins.print'): |
| 263 | cli.do_command(params, 'mkdir --user-folder "/quoting"') |
| 264 | cli.do_command(params, 'cd /quoting') |
| 265 | for subdir in ('a//b', r'c\ d', r'e\"f', r"g\'h", r'\\'): |
| 266 | cli.do_command(params, 'mkdir --user-folder {}'.format(subdir)) |
| 267 | cli.do_command(params, 'cd {}'.format(subdir)) |
| 268 | cli.do_command(params, 'cd /quoting') |
| 269 | |
| 270 | def test_vault_reports(self): |
| 271 | params = TestConnectedCommands.params |