aboutsummaryrefslogtreecommitdiff
path: root/test/compress/issue-1321.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress/issue-1321.js')
-rw-r--r--test/compress/issue-1321.js38
1 files changed, 22 insertions, 16 deletions
diff --git a/test/compress/issue-1321.js b/test/compress/issue-1321.js
index 6b92291d..e55696d0 100644
--- a/test/compress/issue-1321.js
+++ b/test/compress/issue-1321.js
@@ -1,6 +1,8 @@
issue_1321_no_debug: {
- mangle_props = {
- keep_quoted: true
+ mangle = {
+ properties: {
+ keep_quoted: true,
+ },
}
input: {
var x = {};
@@ -10,17 +12,19 @@ issue_1321_no_debug: {
}
expect: {
var x = {};
- x.o = 1;
- x["a"] = 2 * x.o;
- console.log(x.o, x["a"]);
+ x.x = 1;
+ x["a"] = 2 * x.x;
+ console.log(x.x, x["a"]);
}
expect_stdout: true
}
issue_1321_debug: {
- mangle_props = {
- keep_quoted: true,
- debug: ""
+ mangle = {
+ properties: {
+ debug: "",
+ keep_quoted: true,
+ },
}
input: {
var x = {};
@@ -30,16 +34,18 @@ issue_1321_debug: {
}
expect: {
var x = {};
- x.o = 1;
- x["_$foo$_"] = 2 * x.o;
- console.log(x.o, x["_$foo$_"]);
+ x.x = 1;
+ x["_$foo$_"] = 2 * x.x;
+ console.log(x.x, x["_$foo$_"]);
}
expect_stdout: true
}
issue_1321_with_quoted: {
- mangle_props = {
- keep_quoted: false
+ mangle = {
+ properties: {
+ keep_quoted: false,
+ },
}
input: {
var x = {};
@@ -49,9 +55,9 @@ issue_1321_with_quoted: {
}
expect: {
var x = {};
- x.o = 1;
- x["x"] = 2 * x.o;
- console.log(x.o, x["x"]);
+ x.x = 1;
+ x["o"] = 2 * x.x;
+ console.log(x.x, x["o"]);
}
expect_stdout: true
}