aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2017-06-09 04:29:12 +0800
committerGitHub <noreply@github.com>2017-06-09 04:29:12 +0800
commit293c566d6c8c6082c550ce5ca358da4cde124fac (patch)
tree5f5d201e8cc2a7a041157c32a0e7f6a242d00de1 /test
parent9c306406f14087ad0a62141bf7bb9e12afcc1a75 (diff)
downloadtracifyjs-293c566d6c8c6082c550ce5ca358da4cde124fac.tar.gz
tracifyjs-293c566d6c8c6082c550ce5ca358da4cde124fac.zip
marshal `mangle[.properties].reserved` from non-Array values (#2072)
Diffstat (limited to 'test')
-rw-r--r--test/mocha/cli.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/mocha/cli.js b/test/mocha/cli.js
index 0a7f8f2b..3228e4e3 100644
--- a/test/mocha/cli.js
+++ b/test/mocha/cli.js
@@ -546,4 +546,24 @@ describe("bin/uglifyjs", function () {
done();
});
});
+ it("Should work with --mangle reserved=[]", function (done) {
+ var command = uglifyjscmd + ' test/input/issue-505/input.js -m reserved=[callback]';
+
+ exec(command, function (err, stdout) {
+ if (err) throw err;
+
+ assert.strictEqual(stdout, 'function test(callback){"aaaaaaaaaaaaaaaa";callback(err,data);callback(err,data)}\n');
+ done();
+ });
+ });
+ it("Should work with --mangle reserved=false", function (done) {
+ var command = uglifyjscmd + ' test/input/issue-505/input.js -m reserved=false';
+
+ exec(command, function (err, stdout) {
+ if (err) throw err;
+
+ assert.strictEqual(stdout, 'function test(a){"aaaaaaaaaaaaaaaa";a(err,data);a(err,data)}\n');
+ done();
+ });
+ });
});