diff options
Diffstat (limited to 'js/src/jit-test/tests/basic/function-tosource-bug779694.js')
-rw-r--r-- | js/src/jit-test/tests/basic/function-tosource-bug779694.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/function-tosource-bug779694.js b/js/src/jit-test/tests/basic/function-tosource-bug779694.js new file mode 100644 index 0000000000..782b2594bc --- /dev/null +++ b/js/src/jit-test/tests/basic/function-tosource-bug779694.js @@ -0,0 +1,8 @@ +// This test creates poorly compressible input, which tests certain paths in +// source code compression. +var x = ""; +for (var i=0; i<400; ++i) { + x += String.fromCharCode(i * 289); +} +var s = "'" + x + "'"; +assertEq(Function("evt", s).toString(), "function anonymous(evt\n) {\n" + s + "\n}"); |