Exemple #1
0
 def test_shell_quote_escapes_entire_string(self):
     self.assertEqual('"\\$\\$\\$"', shell_quote("$$$"))
Exemple #2
0
 def test_shell_quote_escapes_string(self):
     self.assertEqual('"\\\\"', shell_quote("\\"))
Exemple #3
0
 def test_shell_quote_does_not_escape_its_own_escapes(self):
     self.assertEqual('"\\$"', shell_quote("$"))
Exemple #4
0
 def test_shell_quote_quotes_string(self):
     self.assertEqual('"x"', shell_quote("x"))
 def test_shell_quote_escapes_entire_string(self):
     self.assertEqual('"\\$\\$\\$"', shell_quote("$$$"))
 def test_shell_quote_does_not_escape_its_own_escapes(self):
     self.assertEqual('"\\$"', shell_quote("$"))
 def test_shell_quote_escapes_string(self):
     self.assertEqual('"\\\\"', shell_quote("\\"))
 def test_shell_quote_quotes_string(self):
     self.assertEqual('"x"', shell_quote("x"))