aboutsummaryrefslogtreecommitdiff
path: root/test/compress/keep_fargs.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2020-12-29 16:22:03 +0000
committerGitHub <noreply@github.com>2020-12-30 00:22:03 +0800
commit1956edd503bde9db8e99d8a499d54d5a508f8bb8 (patch)
tree32b1f05ad7820a1070639ef78ae5caf4fcfd0ac9 /test/compress/keep_fargs.js
parent560ccc1221639dca9db354ad6830e418a9f0073d (diff)
downloadtracifyjs-1956edd503bde9db8e99d8a499d54d5a508f8bb8.tar.gz
tracifyjs-1956edd503bde9db8e99d8a499d54d5a508f8bb8.zip
fix corner cases with `arguments` (#4481)
fixes #4480
Diffstat (limited to 'test/compress/keep_fargs.js')
-rw-r--r--test/compress/keep_fargs.js50
1 files changed, 0 insertions, 50 deletions
diff --git a/test/compress/keep_fargs.js b/test/compress/keep_fargs.js
index 049684a7..d5d7ef93 100644
--- a/test/compress/keep_fargs.js
+++ b/test/compress/keep_fargs.js
@@ -80,56 +80,6 @@ keep_fargs_true: {
]
}
-replace_index: {
- options = {
- arguments: true,
- evaluate: true,
- keep_fargs: false,
- properties: true,
- }
- input: {
- var arguments = [];
- console.log(arguments[0]);
- (function() {
- console.log(arguments[1], arguments["1"], arguments["foo"]);
- })("bar", 42);
- (function(a, b) {
- console.log(arguments[1], arguments["1"], arguments["foo"]);
- })("bar", 42);
- (function(arguments) {
- console.log(arguments[1], arguments["1"], arguments["foo"]);
- })("bar", 42);
- (function() {
- var arguments;
- console.log(arguments[1], arguments["1"], arguments["foo"]);
- })("bar", 42);
- }
- expect: {
- var arguments = [];
- console.log(arguments[0]);
- (function(argument_0, argument_1) {
- console.log(argument_1, argument_1, arguments.foo);
- })("bar", 42);
- (function(a, b) {
- console.log(b, b, arguments.foo);
- })("bar", 42);
- (function(arguments) {
- console.log(arguments[1], arguments[1], arguments.foo);
- })("bar", 42);
- (function() {
- var arguments;
- console.log(arguments[1], arguments[1], arguments.foo);
- })("bar", 42);
- }
- expect_stdout: [
- "undefined",
- "42 42 undefined",
- "42 42 undefined",
- "a a undefined",
- "42 42 undefined",
- ]
-}
-
replace_index_strict: {
options = {
arguments: true,