aboutsummaryrefslogtreecommitdiff
path: root/test/compress/evaluate.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress/evaluate.js')
-rw-r--r--test/compress/evaluate.js33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/compress/evaluate.js b/test/compress/evaluate.js
index 2294ca01..614020ea 100644
--- a/test/compress/evaluate.js
+++ b/test/compress/evaluate.js
@@ -1502,3 +1502,36 @@ issue_2919: {
console.log("function(){}");
}
}
+
+issue_2926_1: {
+ options = {
+ evaluate: true,
+ reduce_vars: true,
+ unsafe: true,
+ }
+ input: {
+ (function f(a) {
+ console.log(f.name.length, f.length);
+ })();
+ }
+ expect: {
+ (function f(a) {
+ console.log(1, 1);
+ })();
+ }
+ expect_stdout: "1 1"
+}
+
+issue_2926_2: {
+ options = {
+ evaluate: true,
+ unsafe: true,
+ }
+ input: {
+ console.log(typeof function() {}.valueOf());
+ }
+ expect: {
+ console.log("function");
+ }
+ expect_stdout: "function"
+}