Added three more cases to the test.

This commit is contained in:
pschwartau%netscape.com 2002-01-25 03:17:23 +00:00
Родитель b32c5bf5db
Коммит 51855f980a
1 изменённых файлов: 34 добавлений и 2 удалений

Просмотреть файл

@ -73,13 +73,45 @@ function f()
i=0;
f();
status = inSection(1);
actual = checkThis(i>0);
expect = TEST_PASSED;
expect = checkThis(true);
addThis();
// Now try in function scope -
function g()
{
f();
}
i=0;
g();
status = inSection(2);
actual = checkThis(i>0);
expect = checkThis(true);
addThis();
// Now try in eval scope -
var sEval = 'function h(){++i; try{h();} catch(e){}}; i=0; h();';
eval(sEval);
status = inSection(3);
actual = checkThis(i>0);
expect = checkThis(true);
addThis();
// Try in eval scope and mix functions up -
var sEval = 'function a(){++i; try{h();} catch(e){}}; i=0; a();';
eval(sEval);
status = inSection(4);
actual = checkThis(i>0);
expect = checkThis(true);
addThis();
//-----------------------------------------------------------------------------
test();