aboutsummaryrefslogtreecommitdiff
path: root/test/mocha/minify.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/mocha/minify.js')
-rw-r--r--test/mocha/minify.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/mocha/minify.js b/test/mocha/minify.js
index 88e9c4eb..fc7332fb 100644
--- a/test/mocha/minify.js
+++ b/test/mocha/minify.js
@@ -124,6 +124,17 @@ describe("minify", function() {
assert.strictEqual(result.code,
'a["foo"]="bar",a.a="red",x={"bar":10};');
});
+ it("Should not mangle quoted property within dead code", function() {
+ var result = Uglify.minify('({ "keep": 1 }); g.keep = g.change;', {
+ mangle: {
+ properties: {
+ keep_quoted: true
+ }
+ }
+ });
+ if (result.error) throw result.error;
+ assert.strictEqual(result.code, "g.keep=g.g;");
+ });
});
describe("inSourceMap", function() {