enhance unsafe evaluate (#2037)

This commit is contained in:
Alex Lam S.L
2017-06-01 00:56:28 +08:00
committed by GitHub
parent f71e8fd948
commit 17e73121fa
2 changed files with 53 additions and 0 deletions

View File

@@ -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"
}