aboutsummaryrefslogtreecommitdiff
path: root/test/compress/drop-unused.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2018-06-21 14:10:37 +0800
committeralexlamsl <alexlamsl@gmail.com>2018-06-24 04:00:21 +0800
commit766a4147d4891a093b550e958268c48104330b52 (patch)
tree169df532a88775e8128715aff079821934f4ca9b /test/compress/drop-unused.js
parent915c7e234d0788b0ef502e2c6343d513474c390a (diff)
downloadtracifyjs-766a4147d4891a093b550e958268c48104330b52.tar.gz
tracifyjs-766a4147d4891a093b550e958268c48104330b52.zip
enhance `arguments` (#3193)
fixes #3192
Diffstat (limited to 'test/compress/drop-unused.js')
-rw-r--r--test/compress/drop-unused.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/compress/drop-unused.js b/test/compress/drop-unused.js
index 59990b58..e4daa4fc 100644
--- a/test/compress/drop-unused.js
+++ b/test/compress/drop-unused.js
@@ -1926,3 +1926,31 @@ issue_3146_4: {
}
expect_stdout: "PASS"
}
+
+issue_3192: {
+ options = {
+ unused: true,
+ }
+ input: {
+ (function(a) {
+ console.log(a = "foo", arguments[0]);
+ })("bar");
+ (function(a) {
+ "use strict";
+ console.log(a = "foo", arguments[0]);
+ })("bar");
+ }
+ expect: {
+ (function(a) {
+ console.log(a = "foo", arguments[0]);
+ })("bar");
+ (function(a) {
+ "use strict";
+ console.log("foo", arguments[0]);
+ })("bar");
+ }
+ expect_stdout: [
+ "foo foo",
+ "foo bar",
+ ]
+}