Example #1
0
 def __formatCommand(command):
     """Turns command list into string, keeping whitespace quoted."""
     return " ".join(procOps.shQuote(command))
Example #2
0
 def testQuotesCsh(self):
     # must use /bin/echo, as some csh echos expand backslash sequences
     for (words, expect) in self.testData:
         out = procOps.callProc(["csh", "-c", "/bin/echo " + " ".join(procOps.shQuote(words))])
         self.assertEqual(out, expect)
Example #3
0
 def testQuotesBash(self):
     for (words, expect) in self.testData:
         out = procOps.callProc(["sh", "-c", "/bin/echo " + " ".join(procOps.shQuote(words))])
         self.assertEqual(out, expect)
Example #4
0
 def testQuotesCsh(self):
     # must use /bin/echo, as some csh echos expand backslash sequences
     for (words, expect) in self.testData:
         out = procOps.callProc(
             ["csh", "-c", "/bin/echo " + " ".join(procOps.shQuote(words))])
         self.failUnlessEqual(out, expect)
Example #5
0
 def testQuotesBash(self):
     for (words, expect) in self.testData:
         out = procOps.callProc(
             ["sh", "-c", "/bin/echo " + " ".join(procOps.shQuote(words))])
         self.failUnlessEqual(out, expect)
Example #6
0
 def __formatCommand(command):
     """Turns command list into string, keeping whitespace quoted."""
     return " ".join(procOps.shQuote(command))