From 645d5a348bced192907176876b9e46c942e7d0ae Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Sat, 21 Nov 2020 02:30:46 +0000 Subject: workaround Safari quirks (#4314) fixes #1753 --- test/compress/let.js | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'test') diff --git a/test/compress/let.js b/test/compress/let.js index 76641c3f..fc323320 100644 --- a/test/compress/let.js +++ b/test/compress/let.js @@ -1186,3 +1186,45 @@ issue_4305_2: { expect_stdout: true node_version: ">=4" } + +issue_1753: { + mangle = { + toplevel: false, + webkit: true, + } + input: { + "use strict"; + let l = null; + for (let i = 0; i < 1; i++) + console.log(i); + } + expect: { + "use strict"; + let l = null; + for (let i = 0; i < 1; i++) + console.log(i); + } + expect_stdout: "0" + node_version: ">=4" +} + +issue_1753_toplevel: { + mangle = { + toplevel: true, + webkit: true, + } + input: { + "use strict"; + let l = null; + for (let i = 0; i < 1; i++) + console.log(i); + } + expect: { + "use strict"; + let l = null; + for (let e = 0; e < 1; e++) + console.log(e); + } + expect_stdout: "0" + node_version: ">=4" +} -- cgit v1.2.3