aboutsummaryrefslogtreecommitdiff
path: root/test/compress/properties.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress/properties.js')
-rw-r--r--test/compress/properties.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/compress/properties.js b/test/compress/properties.js
index 736d9d88..39470738 100644
--- a/test/compress/properties.js
+++ b/test/compress/properties.js
@@ -52,3 +52,23 @@ dot_properties_es5: {
a[""] = "whitespace";
}
}
+
+evaluate_length: {
+ options = {
+ properties: true,
+ unsafe: true,
+ evaluate: true
+ };
+ input: {
+ a = "foo".length;
+ a = ("foo" + "bar")["len" + "gth"];
+ a = b.length;
+ a = ("foo" + b).length;
+ }
+ expect: {
+ a = 3;
+ a = 6;
+ a = b.length;
+ a = ("foo" + b).length;
+ }
+}