regress-507295.js (1044B)
1 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ 2 /* This Source Code Form is subject to the terms of the Mozilla Public 3 * License, v. 2.0. If a copy of the MPL was not distributed with this 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 5 6 //----------------------------------------------------------------------------- 7 var BUGNUMBER = 507295; 8 var summary = 'TM: assert with using result of assignment to closure var' 9 var actual = ''; 10 var expect = 'do not crash'; 11 12 13 //----------------------------------------------------------------------------- 14 start_test(); 15 16 (function () { 17 var y; 18 (eval("(function () {\ 19 for (var x = 0; x < 3; ++x) {\ 20 ''.replace(/a/, (y = 3))\ 21 }\ 22 });\ 23 "))() 24 })() 25 26 actual = 'do not crash' 27 finish_test(); 28 //----------------------------------------------------------------------------- 29 30 function start_test() 31 { 32 printBugNumber(BUGNUMBER); 33 printStatus (summary); 34 } 35 36 function finish_test() 37 { 38 reportCompare(expect, actual, summary); 39 }