mirror of https://gitlab.com/pamhyr/pamhyr2
unittests: Add parse tests for ' quote.
parent
3c738ebcb9
commit
7bbca7cf54
|
|
@ -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"]
|
||||
|
|
|
|||
Loading…
Reference in New Issue