示例#1
0
 public void Complex_string_escaped()
 {
     JavaScriptUtilities.EscapeJavaScriptString("'this is a \\\" test'")
     .ShouldEqual("\\'this is a \\\\\\\" test\\'");
 }
示例#2
0
 public void Line_feed_escaped()
 {
     JavaScriptUtilities.EscapeJavaScriptString("\n").ShouldEqual("\\n");
 }
示例#3
0
 public void Carraige_return_escaped()
 {
     JavaScriptUtilities.EscapeJavaScriptString("\r").ShouldEqual("\\r");
 }
示例#4
0
 public void Single_quote_escaped()
 {
     JavaScriptUtilities.EscapeJavaScriptString("'").ShouldEqual("\\'");
 }
示例#5
0
 public void Double_quote_escaped()
 {
     JavaScriptUtilities.EscapeJavaScriptString("\"").ShouldEqual("\\\"");
 }
示例#6
0
 public void Backslash_escaped()
 {
     JavaScriptUtilities.EscapeJavaScriptString("\\").ShouldEqual("\\\\");
 }