Esempio n. 1
0
 def test_no_false_positive_start(self):
     cmd = 'x = `echo 1'
     intermediate = preprocessor._process_code_both(cmd)
     self.assertEqual(intermediate, 'x = `echo 1')
Esempio n. 2
0
 def test_with_param(self):
     cmd = 'x = p`echo 1`'
     intermediate = preprocessor._process_code_both(cmd)
     self.assertEqual(intermediate, 'x = both_shexe(echo 1)shexe(p)shexe')
Esempio n. 3
0
 def test_multiline(self):
     cmd = 'i = 1\nx = `echo 1`\ni = 2'
     intermediate = preprocessor._process_code_both(cmd)
     self.assertEqual(intermediate,
                      'i = 1\nx = both_shexe(echo 1)shexe()shexe\ni = 2')
Esempio n. 4
0
 def test_very_simple(self):
     cmd = '`echo 1`'
     intermediate = preprocessor._process_code_both(cmd)
     self.assertEqual(intermediate, 'both_shexe(echo 1)shexe()shexe')
Esempio n. 5
0
 def test_no_false_positive_start(self):
     cmd = 'x = `echo 1'
     intermediate = preprocessor._process_code_both(cmd)
     self.assertEqual(intermediate, 'x = `echo 1')
Esempio n. 6
0
 def test_multiline(self):
     cmd = 'i = 1\nx = `echo 1`\ni = 2'
     intermediate = preprocessor._process_code_both(cmd)
     self.assertEqual(intermediate, 'i = 1\nx = both_shexe(echo 1)shexe()shexe\ni = 2')
Esempio n. 7
0
 def test_with_param(self):
     cmd = 'x = p`echo 1`'
     intermediate = preprocessor._process_code_both(cmd)
     self.assertEqual(intermediate, 'x = both_shexe(echo 1)shexe(p)shexe')
Esempio n. 8
0
 def test_very_simple(self):
     cmd = '`echo 1`'
     intermediate = preprocessor._process_code_both(cmd)
     self.assertEqual(intermediate, 'both_shexe(echo 1)shexe()shexe')