aboutsummaryrefslogtreecommitdiff
path: root/test/compress
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress')
-rw-r--r--test/compress/sandbox.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/compress/sandbox.js b/test/compress/sandbox.js
index 338afd11..9cf76725 100644
--- a/test/compress/sandbox.js
+++ b/test/compress/sandbox.js
@@ -98,6 +98,31 @@ log_global: {
expect_stdout: "[object global]"
}
+log_nested: {
+ options = {
+ unused: true,
+ }
+ input: {
+ var o = { p: 42 };
+ for (var i = 0; i < 10; i++)
+ o = {
+ p: o,
+ q: function foo() {},
+ };
+ console.log(o);
+ }
+ expect: {
+ var o = { p: 42 };
+ for (var i = 0; i < 10; i++)
+ o = {
+ p: o,
+ q: function() {},
+ };
+ console.log(o);
+ }
+ expect_stdout: true
+}
+
timers: {
options = {
reduce_vars: true,