`input` and `expect` are parsed as `AST_BlockStatement` which does not support `AST_Directive` by default. Emulate that by transforming preceding `AST_SimpleStatement`s of `AST_String` into `AST_Directive`.
52 lines
989 B
JavaScript
52 lines
989 B
JavaScript
mangle_keep_fnames_false: {
|
|
options = {
|
|
keep_fnames : true,
|
|
keep_fargs : true,
|
|
}
|
|
mangle = {
|
|
keep_fnames : false,
|
|
}
|
|
input: {
|
|
"use strict";
|
|
function total() {
|
|
return function n(a, b, c) {
|
|
return a + b + c;
|
|
};
|
|
}
|
|
}
|
|
expect: {
|
|
"use strict";
|
|
function total() {
|
|
return function t(n, r, u) {
|
|
return n + r + u;
|
|
};
|
|
}
|
|
}
|
|
}
|
|
|
|
mangle_keep_fnames_true: {
|
|
options = {
|
|
keep_fnames : true,
|
|
keep_fargs : true,
|
|
}
|
|
mangle = {
|
|
keep_fnames : true,
|
|
}
|
|
input: {
|
|
"use strict";
|
|
function total() {
|
|
return function n(a, b, c) {
|
|
return a + b + c;
|
|
};
|
|
}
|
|
}
|
|
expect: {
|
|
"use strict";
|
|
function total() {
|
|
return function n(t, r, u) {
|
|
return t + r + u;
|
|
};
|
|
}
|
|
}
|
|
}
|