Exemplo n.º 1
0
 def test_shell_quote_escapes_entire_string(self):
     self.assertEqual('"\\$\\$\\$"', shell_quote("$$$"))
Exemplo n.º 2
0
 def test_shell_quote_escapes_string(self):
     self.assertEqual('"\\\\"', shell_quote("\\"))
Exemplo n.º 3
0
 def test_shell_quote_does_not_escape_its_own_escapes(self):
     self.assertEqual('"\\$"', shell_quote("$"))
Exemplo n.º 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"))