added test case for invalid escape sequences
authorMatthias Kramm <kramm@quiss.org>
Sat, 14 Mar 2009 20:22:38 +0000 (21:22 +0100)
committerMatthias Kramm <kramm@quiss.org>
Sat, 14 Mar 2009 20:22:38 +0000 (21:22 +0100)
lib/as3/ok/strings.as

index 5b9f121..92bb9e5 100644 (file)
@@ -8,7 +8,7 @@ package {
 
         function Main() {
             var email = "test@test.de";
-            if(email.length == 12) trace("ok 1/5");
+            if(email.length == 12) trace("ok 1/6");
             if(email.charAt(4)!='@') trace("error");
 
             var x;
@@ -18,16 +18,21 @@ package {
                     y=true;
                 }
             }
-            if(y) trace("ok 2/5");
+            if(y) trace("ok 2/6");
 
             var zero1 = "test\0test";
             if(zero1.charAt(4)!='\0') trace("error");
-            else trace("ok 3/5");
+            else trace("ok 3/6");
 
             if(this.mystring.charAt(1)!='\0') trace("error");
-            else trace("ok 4/5");
+            else trace("ok 4/6");
             if(this.mystring.charAt(3)!='\xff') trace("error");
-            else trace("ok 5/5");
+            else trace("ok 5/6");
+
+            if("\w" == "\\w")
+                trace("ok 6/6");
+
+
             trace("[exit]");
         }
     }