mirror of
https://github.com/clearml/wexpect-venv
synced 2025-02-07 13:30:56 +00:00
[ADD][TST] test join args
This commit is contained in:
parent
f3332108a6
commit
44921d18de
@ -34,6 +34,15 @@ class SplitCommandLineTestCase(PexpectTestCase.PexpectTestCase):
|
||||
assert len(wexpect.split_command_line(r'one\"one')) == 1
|
||||
assert len(wexpect.split_command_line(r"This^' is a^'^ test")) == 3
|
||||
|
||||
def test_join_args(self):
|
||||
cmd = 'foo bar "b a z"'
|
||||
cmd2 = wexpect.join_args(wexpect.split_command_line(cmd))
|
||||
self.assertEqual(cmd2, cmd)
|
||||
|
||||
cmd = ['foo', 'bar', 'b a z']
|
||||
cmd2 = wexpect.split_command_line(wexpect.join_args(cmd))
|
||||
self.assertEqual(cmd2, cmd)
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user