Merge branch 'master' into harmony-v3.3.6

This commit is contained in:
alexlamsl
2018-01-13 13:53:31 +08:00
13 changed files with 636 additions and 164 deletions

View File

@@ -404,4 +404,18 @@ describe("minify", function() {
assert.strictEqual(stat.print_to_string(), "a=x()");
});
});
describe("rename", function() {
it("Should be repeatable", function() {
var code = "!function(x){return x(x)}(y);";
for (var i = 0; i < 2; i++) {
assert.strictEqual(Uglify.minify(code, {
compress: {
toplevel: true,
},
rename: true,
}).code, "var a;(a=y)(a);");
}
});
});
});