Ejemplo n.º 1
0
 def testCmdString(self):
     cmd = ['ls', '-l', 'some file']
     self.assertEqual(info.cmdString(cmd), "ls -l 'some file'")
     cmd = ['ls', '-l', 'some\tfile']
     self.assertEqual(info.cmdString(cmd), "ls -l 'some\tfile'")
     cmd = ['ls', '-l', 'some;file']
     self.assertEqual(info.cmdString(cmd), "ls -l 'some;file'")
Ejemplo n.º 2
0
 def testCmdString(self):
     cmd = ['ls', '-l', 'some file']
     self._assertCmd(info.cmdString(cmd), "ls -l 'some file'")
     cmd = ['ls', '-l', 'some\tfile']
     self._assertCmd(info.cmdString(cmd), "ls -l 'some\tfile'")
     cmd = [u'ls', u'-l', u'some\tfile']
     self._assertCmd(info.cmdString(cmd), "ls -l 'some\tfile'")
     cmd = ['ls', '-l', 'some;file']
     self._assertCmd(info.cmdString(cmd), "ls -l 'some;file'")
Ejemplo n.º 3
0
 def testCmdStringEncodingError(self):
     cmd = [u'foo', u'bar\xa0', u'zoo']
     self._assertCmd(info.cmdString(cmd), "foo 'bar<A0>' zoo")
Ejemplo n.º 4
0
 def testCmdStringBang(self):
     cmd = [u'ls', u'-l', u'!something']
     self._assertCmd(info.cmdString(cmd), "ls -l '!something'")
Ejemplo n.º 5
0
 def testCmdStringBang(self):
     cmd = ['ls', '-l', '!something']
     self.assertEqual(info.cmdString(cmd), "ls -l '!something'")