def test_multiple(self): self.assertEqual(windows.join_lines(['foo', 'bar']), shell_list([ shell_literal('foo'), shell_literal('&&'), shell_literal('bar'), ])) self.assertEqual( windows.join_lines([['foo', 'bar'], 'baz']), shell_list([ 'foo', 'bar', shell_literal('&&'), shell_literal('baz'), ]) )
def test_single(self): self.assertEqual(windows.join_lines(['foo']), shell_list([shell_literal('foo')])) self.assertEqual(windows.join_lines([['foo']]), ['foo']) self.assertEqual(windows.join_lines([['foo', 'bar']]), ['foo', 'bar'])
def test_empty(self): self.assertEqual(windows.join_lines([]), [])