aboutsummaryrefslogtreecommitdiff
path: root/test/compress/reduce_vars.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress/reduce_vars.js')
-rw-r--r--test/compress/reduce_vars.js31
1 files changed, 31 insertions, 0 deletions
diff --git a/test/compress/reduce_vars.js b/test/compress/reduce_vars.js
index bf1155b7..2b2c77da 100644
--- a/test/compress/reduce_vars.js
+++ b/test/compress/reduce_vars.js
@@ -3423,6 +3423,37 @@ escaped_prop_1: {
escaped_prop_2: {
options = {
+ collapse_vars: true,
+ evaluate: true,
+ inline: true,
+ passes: 2,
+ pure_getters: "strict",
+ reduce_funcs: true,
+ reduce_vars: true,
+ side_effects: true,
+ toplevel: true,
+ unsafe: true,
+ unused: true,
+ }
+ input: {
+ var obj = { o: { a: 1 } };
+ (function(o) {
+ o.a++;
+ })(obj.o);
+ (function(o) {
+ console.log(o.a);
+ })(obj.o);
+ }
+ expect: {
+ var obj = { o: { a: 1 } };
+ obj.o.a++;
+ console.log(obj.o.a);
+ }
+ expect_stdout: "2"
+}
+
+escaped_prop_3: {
+ options = {
reduce_funcs: true,
reduce_vars: true,
toplevel: true,