Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

Commit

Permalink
JavaScript Tests - update test due to fix to bug 410981, not part of …
Browse files Browse the repository at this point in the history
…the build
  • Loading branch information
Unknown committed Jan 7, 2008
1 parent aff2b36 commit c610f59
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions js/tests/js1_7/extensions/regress-346642-06.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,22 @@ function test()
actual = 3;
reportCompare(expect, actual, summary + ': 1');

var z = 6;
var f = (function (){for(let [] = []; false;) let z; return z});
expect = f();
actual = eval("("+f+")")()
reportCompare(expect, actual, summary + ': 2');
try
{
var z = 6;
var f = eval('(function (){for(let [] = []; false;) let z; return z})');
expect = f();
actual = eval("("+f+")")()
reportCompare(expect, actual, summary + ': 2');
}
catch(ex)
{
// See https://bugzilla.mozilla.org/show_bug.cgi?id=408957
var summarytrunk = 'let declaration must be direct child of block or top-level implicit block';
expect = 'SyntaxError';
actual = ex.name;
reportCompare(expect, actual, summarytrunk);
}

expect = 3;
actual = '';
Expand Down

0 comments on commit c610f59

Please sign in to comment.