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