aboutsummaryrefslogtreecommitdiff
path: root/test/compress/evaluate.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2018-02-16 17:21:46 +0800
committerGitHub <noreply@github.com>2018-02-16 17:21:46 +0800
commita2a9459684462224a93710631dcc29624d010e21 (patch)
treeca876dcf0042de11a9a679b3c0a5c338cc332333 /test/compress/evaluate.js
parenta3dfeea1444b6fc16ed2a02577800c1bf81e08bf (diff)
downloadtracifyjs-a2a9459684462224a93710631dcc29624d010e21.tar.gz
tracifyjs-a2a9459684462224a93710631dcc29624d010e21.zip
fix `unsafe` `evaluate` of `AST_Function` (#2920)
fixes #2919
Diffstat (limited to 'test/compress/evaluate.js')
-rw-r--r--test/compress/evaluate.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/compress/evaluate.js b/test/compress/evaluate.js
index 3ac62ef5..2294ca01 100644
--- a/test/compress/evaluate.js
+++ b/test/compress/evaluate.js
@@ -1489,3 +1489,16 @@ issue_2916_2: {
}
expect_stdout: "PASS"
}
+
+issue_2919: {
+ options = {
+ evaluate: true,
+ unsafe: true,
+ }
+ input: {
+ console.log([ function() {} ].toString());
+ }
+ expect: {
+ console.log("function(){}");
+ }
+}