diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/compress/evaluate.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/compress/evaluate.js b/test/compress/evaluate.js index a1e3d0be..020d7cf3 100644 --- a/test/compress/evaluate.js +++ b/test/compress/evaluate.js @@ -1037,3 +1037,31 @@ issue_1964_2: { } expect_stdout: "b" } + +array_slice_index: { + options = { + evaluate: true, + unsafe: true, + } + input: { + console.log([1,2,3].slice(1)[1]); + } + expect: { + console.log(3); + } + expect_stdout: "3" +} + +string_charCodeAt: { + options = { + evaluate: true, + unsafe: true, + } + input: { + console.log("foo".charCodeAt("bar".length)); + } + expect: { + console.log(NaN); + } + expect_stdout: "NaN" +} |