From 4a528c469c8b962912c8628fb312e772dd77fe2f Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Sun, 18 Feb 2018 02:13:26 +0800 Subject: reduce false positives from `function.toString()` (#2928) --- test/sandbox.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/sandbox.js b/test/sandbox.js index 80cbc3bf..c477a8a2 100644 --- a/test/sandbox.js +++ b/test/sandbox.js @@ -39,7 +39,11 @@ var FUNC_TOSTRING = [ " });", ] : [], [ " }", - ' return "function " + n + "() {...}";', + ' return "function " + n + "() {' + function() { + var s = "\7"; + for (var i = 10; --i >= 0;) s += s; + return s; + }() + '}";', " }", "}();", ]).join("\n"); -- cgit v1.2.3