mirror of
https://github.com/ceph/ceph
synced 2024-12-17 00:46:05 +00:00
Simple unit tests for shell quoting.
This commit is contained in:
parent
be28e5bfd8
commit
dad0a67a89
@ -307,3 +307,12 @@ def test_run_stdin_pipe():
|
||||
eq(r.exitstatus.ready(), False)
|
||||
got = r.exitstatus.get()
|
||||
eq(got, 0)
|
||||
|
||||
|
||||
def test_quote_simple():
|
||||
got = run.quote(['a b', ' c', 'd e '])
|
||||
eq(got, "'a b' ' c' 'd e '")
|
||||
|
||||
def test_quote_and_quote():
|
||||
got = run.quote(['echo', 'this && is embedded', '&&', 'that was standalone'])
|
||||
eq(got, "echo 'this && is embedded' '&&' 'that was standalone'")
|
||||
|
Loading…
Reference in New Issue
Block a user