From: Alex Lam S.L Date: Wed, 30 Dec 2020 13:53:03 +0000 (+0000) Subject: improve false positive detection in `ufuzz` (#4482) X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=0013cbf91f5a833eb51e3473ef2f18844f722ae9;p=UglifyJS.git improve false positive detection in `ufuzz` (#4482) --- diff --git a/test/ufuzz/index.js b/test/ufuzz/index.js index e5bf0083..23b3a144 100644 --- a/test/ufuzz/index.js +++ b/test/ufuzz/index.js @@ -1710,7 +1710,9 @@ function log(options) { function sort_globals(code) { var globals = sandbox.run_code("throw Object.keys(this).sort();" + code); - return globals.length ? "var " + globals.join(",") + ";" + code : code; + return globals.length ? "var " + globals.map(function(name) { + return name + "=" + name; + }).join(",") + ";" + code : code; } function fuzzy_match(original, uglified) {