def test_shell_quote_escapes_entire_string(self): self.assertEqual('"\\$\\$\\$"', shell_quote("$$$"))
def test_shell_quote_escapes_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_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"))