Example #1
0
 def test_literal(self):
     self.assertEqual(posix.join(['foo bar',
                                  shell_literal('>'), 'baz']),
                      "'foo bar' > baz")
     self.assertEqual(posix.join(['foo bar' + shell_literal('>'), 'baz']),
                      "'foo bar'> baz")
Example #2
0
 def test_single(self):
     self.assertEqual(posix.join(['foo']), 'foo')
     self.assertEqual(posix.join(['foo bar']), "'foo bar'")
Example #3
0
 def test_multiple(self):
     self.assertEqual(posix.join(['foo bar', 'baz']), "'foo bar' baz")
Example #4
0
 def test_empty(self):
     self.assertEqual(posix.join([]), '')