diff options
author | Trey Griffith <trey.griffith@gmail.com> | 2013-05-08 15:29:46 -0400 |
---|---|---|
committer | Mihai Bazon <mihai@bazon.net> | 2013-05-08 22:43:20 +0300 |
commit | 1e9f98aa51fa87678c6d5191903fc249df4f3e35 (patch) | |
tree | 5943307cf7d07faea8310526741637b31c96cc16 /test/compress | |
parent | 11e24d53a195685578abe76b6ef34cb80f3a5730 (diff) | |
download | tracifyjs-1e9f98aa51fa87678c6d5191903fc249df4f3e35.tar.gz tracifyjs-1e9f98aa51fa87678c6d5191903fc249df4f3e35.zip |
add a test for zero-length string in is_identifier_string, which is used in property compression. Also added a test exercising the change.
Diffstat (limited to 'test/compress')
-rw-r--r-- | test/compress/properties.js | 4 |
1 files changed, 4 insertions, 0 deletions
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"; } } |