示例#1
0
 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'),
         ])
     )
示例#2
0
 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'])
示例#3
0
 def test_empty(self):
     self.assertEqual(windows.join_lines([]), [])