aboutsummaryrefslogtreecommitdiff
path: root/test/compress/issue-1770.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress/issue-1770.js')
-rw-r--r--test/compress/issue-1770.js48
1 files changed, 48 insertions, 0 deletions
diff --git a/test/compress/issue-1770.js b/test/compress/issue-1770.js
new file mode 100644
index 00000000..69df8960
--- /dev/null
+++ b/test/compress/issue-1770.js
@@ -0,0 +1,48 @@
+mangle_props: {
+ mangle_props = {}
+ input: {
+ var obj = {
+ undefined: 1,
+ NaN: 2,
+ Infinity: 3,
+ "-Infinity": 4,
+ };
+ console.log(
+ obj[void 0],
+ obj[undefined],
+ obj["undefined"],
+ obj[0/0],
+ obj[NaN],
+ obj["NaN"],
+ obj[1/0],
+ obj[Infinity],
+ obj["Infinity"],
+ obj[-1/0],
+ obj[-Infinity],
+ obj["-Infinity"]
+ );
+ }
+ expect: {
+ var obj = {
+ undefined: 1,
+ NaN: 2,
+ Infinity: 3,
+ "-Infinity": 4,
+ };
+ console.log(
+ obj[void 0],
+ obj[void 0],
+ obj["undefined"],
+ obj[0/0],
+ obj[NaN],
+ obj["NaN"],
+ obj[1/0],
+ obj[1/0],
+ obj["Infinity"],
+ obj[-1/0],
+ obj[-1/0],
+ obj["-Infinity"]
+ );
+ }
+ expect_stdout: true
+}