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")
def test_single(self): self.assertEqual(posix.join(['foo']), 'foo') self.assertEqual(posix.join(['foo bar']), "'foo bar'")
def test_multiple(self): self.assertEqual(posix.join(['foo bar', 'baz']), "'foo bar' baz")
def test_empty(self): self.assertEqual(posix.join([]), '')