def test_escape_js_string_ampersand(self):
     self.assertEqual('&', escape_js_string('&'))
 def test_escape_js_string_doublequote(self):
     self.assertEqual('\\"', escape_js_string('"'))
 def test_escape_js_string_backslash(self):
     self.assertEqual('\\\\', escape_js_string('\\'))
 def test_escape_js_string_plain(self):
     self.assertEqual('foo', escape_js_string('foo'))
 def test_escape_js_string_singlequote(self):
     self.assertEqual("\\'", escape_js_string("'"))
예제 #6
0
 def test_escape_js_string_ampersand(self):
     self.assertEqual('&', escape_js_string('&'))
 def test_escape_js_string_empty(self):
     self.assertEqual('', escape_js_string(''))
예제 #8
0
 def test_escape_js_string_backslash(self):
     self.assertEqual('\\\\', escape_js_string('\\'))
예제 #9
0
 def test_escape_js_string_doublequote(self):
     self.assertEqual('\\"', escape_js_string('"'))
예제 #10
0
 def test_escape_js_string_singlequote(self):
     self.assertEqual("\\'", escape_js_string("'"))
예제 #11
0
 def test_escape_js_string_plain(self):
     self.assertEqual('foo', escape_js_string('foo'))
예제 #12
0
 def test_escape_js_string_empty(self):
     self.assertEqual('', escape_js_string(''))