Test for upvar2 dup/dep bug 473271, from comment 8; also remove print noise from testPropagatedFunArgs crash test.

This commit is contained in:
Brendan Eich 2009-04-06 11:18:10 -07:00
parent 3c4a821492
commit 862f9eb6d3

View File

@ -4558,6 +4558,22 @@ function testClosures()
testClosures.expected = "00,11,22,33,44"; testClosures.expected = "00,11,22,33,44";
test(testClosures); test(testClosures);
function testMoreClosures() {
var f = {}, max = 3;
var hello = function(n) {
function howdy() { return n * n }
f.test = howdy;
};
for (var i = 0; i <= max; i++)
hello(i);
return f.test();
}
testMoreClosures.expected = 9;
test(testMoreClosures);
function testLambdaInitedVar() { function testLambdaInitedVar() {
var jQuery = function (a, b) { var jQuery = function (a, b) {
return jQuery && jQuery.length; return jQuery && jQuery.length;
@ -4673,7 +4689,7 @@ test(testPropagatedFunArgs);
function notSafe() { function notSafe() {
return magic; return magic;
} }
print(notSafe()); notSafe();
res.push(pageInfo); res.push(pageInfo);
}; };
var feedTab = $("feedTab"); var feedTab = $("feedTab");