mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 601307 - Add a test for directness of the eval in |with (...) eval(...)| (assuming eval is the global eval function). r=jimb
--HG-- extra : rebase_source : 9a6b233cd99a3f9016c760f1249497d5a39d0c55
This commit is contained in:
parent
44405a40a0
commit
9361db8ece
28
js/src/tests/ecma_5/Global/eval-inside-with-is-direct.js
Normal file
28
js/src/tests/ecma_5/Global/eval-inside-with-is-direct.js
Normal file
@ -0,0 +1,28 @@
|
||||
// Any copyright is dedicated to the Public Domain.
|
||||
// http://creativecommons.org/licenses/publicdomain/
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
var BUGNUMBER = 601307;
|
||||
var summary = "with (...) eval(...) is a direct eval";
|
||||
|
||||
print(BUGNUMBER + ": " + summary);
|
||||
|
||||
/**************
|
||||
* BEGIN TEST *
|
||||
**************/
|
||||
|
||||
var t = "global";
|
||||
function test()
|
||||
{
|
||||
var t = "local";
|
||||
with ({})
|
||||
return eval("t");
|
||||
}
|
||||
assertEq(test(), "local");
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(true, true);
|
||||
|
||||
print("All tests passed!");
|
@ -2,3 +2,4 @@ url-prefix ../../jsreftest.html?test=ecma_5/Global/
|
||||
script parseInt-01.js
|
||||
script eval-01.js
|
||||
script eval-02.js
|
||||
script eval-inside-with-is-direct.js
|
||||
|
Loading…
Reference in New Issue
Block a user