add a test for zero-length string in is_identifier_string, which is used in property...
authorTrey Griffith <trey.griffith@gmail.com>
Wed, 8 May 2013 19:29:46 +0000 (15:29 -0400)
committerMihai Bazon <mihai@bazon.net>
Wed, 8 May 2013 19:43:20 +0000 (22:43 +0300)
test/compress/properties.js

index d52680c..f490fd8 100644 (file)
@@ -19,12 +19,14 @@ dot_properties: {
         a["if"] = "if";
         a["*"] = "asterisk";
         a["\u0EB3"] = "unicode";
+        a[""] = "whitespace";
     }
     expect: {
         a.foo = "bar";
         a["if"] = "if";
         a["*"] = "asterisk";
         a.\u0EB3 = "unicode";
+        a[""] = "whitespace";
     }
 }
 
@@ -38,11 +40,13 @@ dot_properties_es5: {
         a["if"] = "if";
         a["*"] = "asterisk";
         a["\u0EB3"] = "unicode";
+        a[""] = "whitespace";
     }
     expect: {
         a.foo = "bar";
         a.if = "if";
         a["*"] = "asterisk";
         a.\u0EB3 = "unicode";
+        a[""] = "whitespace";
     }
 }