コード例 #1
0
 def test_shell_quote_escapes_entire_string(self):
     self.assertEqual('"\\$\\$\\$"', shell_quote("$$$"))
コード例 #2
0
 def test_shell_quote_escapes_string(self):
     self.assertEqual('"\\\\"', shell_quote("\\"))
コード例 #3
0
 def test_shell_quote_does_not_escape_its_own_escapes(self):
     self.assertEqual('"\\$"', shell_quote("$"))
コード例 #4
0
 def test_shell_quote_quotes_string(self):
     self.assertEqual('"x"', shell_quote("x"))
コード例 #5
0
 def test_shell_quote_escapes_entire_string(self):
     self.assertEqual('"\\$\\$\\$"', shell_quote("$$$"))
コード例 #6
0
 def test_shell_quote_does_not_escape_its_own_escapes(self):
     self.assertEqual('"\\$"', shell_quote("$"))
コード例 #7
0
 def test_shell_quote_escapes_string(self):
     self.assertEqual('"\\\\"', shell_quote("\\"))
コード例 #8
0
 def test_shell_quote_quotes_string(self):
     self.assertEqual('"x"', shell_quote("x"))