Modifying test-global to accomodate v8 inter-context 'global' protection.

pull/22966/head
Herbert Vojčík 2010-08-20 17:15:37 +02:00 committed by Ryan Dahl
parent 2a03d5802b
commit 6789ab16d8
2 changed files with 2 additions and 4 deletions

View File

@ -1,6 +1,4 @@
foo = "foo"; foo = "foo";
global.bar = "bar"; global.bar = "bar";
exports.fooBar = function () { exports.fooBar = {foo: global.foo, bar:bar};
return {foo: global.foo, bar: bar};
};

View File

@ -9,7 +9,7 @@ assert.equal("foo", global.baseFoo, "x -> global.x in base level not working");
assert.equal("bar", baseBar, "global.x -> x in base level not working"); assert.equal("bar", baseBar, "global.x -> x in base level not working");
var module = require("../fixtures/global/plain"), var module = require("../fixtures/global/plain"),
fooBar = module.fooBar(); fooBar = module.fooBar;
assert.equal("foo", fooBar.foo, "x -> global.x in sub level not working"); assert.equal("foo", fooBar.foo, "x -> global.x in sub level not working");