mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
unittests: Add parse tests for ' quote.
This commit is contained in:
1 parent
3c738ebcb9
commit
7bbca7cf54
1 file changed
+9
@@ -140,6 +140,15 @@ class ToolsCMDParserTestCase(unittest.TestCase):
|
||||
for i, s in enumerate(expect):
|
||||
self.assertEqual(res[i], s)
|
||||
|
||||
def test_unix_quoted2_args_with_space(self):
|
||||
cmd = "\'/foo/bar baz\' -a -b -c='baz bazz'"
|
||||
expect = ["/foo/bar baz", "-a", '-b', "-c='baz bazz'"]
|
||||
|
||||
res = parse_command_line(cmd)
|
||||
|
||||
for i, s in enumerate(expect):
|
||||
self.assertEqual(res[i], s)
|
||||
|
||||
def test_unix_escape_space(self):
|
||||
cmd = r"/foo/bar\ baz -a -b -c"
|
||||
expect = [r"/foo/bar\ baz", "-a", '-b', "-c"]
|
||||
|
||||
Reference in new issue
Block a user