implement keep_fargs for mangle (#5307)

closes #4657
This commit is contained in:
Alex Lam S.L
2022-01-20 21:13:26 +00:00
committed by GitHub
parent efed55f42d
commit e24b255350
20 changed files with 507 additions and 267 deletions

View File

@@ -925,6 +925,28 @@ duplicate_lambda_defun_name_2: {
expect_stdout: "0"
}
function_argument_mangle: {
mangle = {
keep_fargs: true,
toplevel: true,
}
input: {
A = "PASS";
var a = A;
(function(o) {
console.log(a);
})("FAIL");
}
expect: {
A = "PASS";
var n = A;
(function(o) {
console.log(n);
})("FAIL");
}
expect_stdout: "PASS"
}
function_name_mangle: {
options = {
keep_fargs: false,