From: Trey Griffith Date: Wed, 8 May 2013 19:29:46 +0000 (-0400) Subject: add a test for zero-length string in is_identifier_string, which is used in property... X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=1e9f98aa51fa87678c6d5191903fc249df4f3e35;p=UglifyJS.git add a test for zero-length string in is_identifier_string, which is used in property compression. Also added a test exercising the change. --- diff --git a/test/compress/properties.js b/test/compress/properties.js index d52680c2..f490fd86 100644 --- a/test/compress/properties.js +++ b/test/compress/properties.js @@ -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"; } }