Exemplo n.º 1
0
 def test_escape_quote(self):
     intermediate = 'x = start_shexe(echo \'1\')shexe()shexe'
     escaped = preprocessor._escape(intermediate)
     self.assertEqual(escaped,
                      'x = start_shexe(echo \\\'1\\\')shexe()shexe')
Exemplo n.º 2
0
 def test_escape_quote(self):
     intermediate = 'x = start_shexe(echo \'1\')shexe()shexe'
     escaped = preprocessor._escape(intermediate)
     self.assertEqual(escaped, 'x = start_shexe(echo \\\'1\\\')shexe()shexe')
Exemplo n.º 3
0
 def test_escape_nothing(self):
     intermediate = 'x = start_shexe(echo 1)shexe()shexe'
     escaped = preprocessor._escape(intermediate)
     self.assertEqual(escaped, intermediate)
Exemplo n.º 4
0
 def test_escape_nothing(self):
     intermediate = 'x = start_shexe(echo 1)shexe()shexe'
     escaped = preprocessor._escape(intermediate)
     self.assertEqual(escaped, intermediate)