Example #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')
 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')
Example #3
0
 def test_escape_nothing(self):
     intermediate = 'x = start_shexe(echo 1)shexe()shexe'
     escaped = preprocessor._escape(intermediate)
     self.assertEqual(escaped, intermediate)
 def test_escape_nothing(self):
     intermediate = 'x = start_shexe(echo 1)shexe()shexe'
     escaped = preprocessor._escape(intermediate)
     self.assertEqual(escaped, intermediate)