mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Tools: Command line parser: Add a test.
This commit is contained in:
1 parent
6c794d2eb4
commit
65c261887c
1 file changed
+10
@@ -78,6 +78,16 @@ class ToolsCMDParserTestCase(unittest.TestCase):
|
||||
for i, s in enumerate(expect):
|
||||
self.assertEqual(res[i], s)
|
||||
|
||||
def test_unix_escape_space(self):
|
||||
cmd = "/foo/bar\ baz -a -b -c"
|
||||
expect = ["/foo/bar\ baz", "-a", '-b', "-c"]
|
||||
|
||||
res = parse_command_line(cmd)
|
||||
|
||||
for i, s in enumerate(expect):
|
||||
self.assertEqual(res[i], s)
|
||||
|
||||
|
||||
def test_windows_prog_files(self):
|
||||
cmd = "\"C:\\Program Files (x86)\foo\bar\" a -b -c"
|
||||
expect = ["C:\\Program Files (x86)\foo\bar", "a", '-b', "-c"]
|
||||
|
||||
Reference in new issue
Block a user