run everything in either local shell (shell=true), or remote shell (ssh). this it to allow external shell piping

This commit is contained in:
Edwin Eefting
2021-05-09 10:56:30 +02:00
parent 521d1078bd
commit 086cfe570b
4 changed files with 41 additions and 45 deletions

View File

@ -26,9 +26,9 @@ class TestExecuteNode(unittest2.TestCase):
with self.subTest("multiline tabsplit"):
self.assertEqual(node.run(["echo","l1c1\tl1c2\nl2c1\tl2c2"], tab_split=True), [['l1c1', 'l1c2'], ['l2c1', 'l2c2']])
#escaping test (shouldnt be a problem locally, single quotes can be a problem remote via ssh)
#escaping test
with self.subTest("escape test"):
s="><`'\"@&$()$bla\\/.*!#test _+-={}[]|"
s="><`'\"@&$()$bla\\/.* !#test _+-={}[]| ${bla} $bla"
self.assertEqual(node.run(["echo",s]), [s])
#return std err as well, trigger stderr by listing something non existing