| // Copyright 2009 the Sputnik authors. All rights reserved. |
| // This code is governed by the BSD license found in the LICENSE file. |
| info: Changing property using "eval" statement containing "with" statement |
| description: Changing function property |
| p1: function(){return 0;}, |
| eval("with(myObj){p1=function(){return 1;}}"); |
| ////////////////////////////////////////////////////////////////////////////// |
| $ERROR('#1: myObj.p1 === 1. Actual: myObj.p1 ==='+ myObj.p1 ); |
| ////////////////////////////////////////////////////////////////////////////// |
| ////////////////////////////////////////////////////////////////////////////// |
| $ERROR('#2: myObj.p1 !== \'a\''); |
| ////////////////////////////////////////////////////////////////////////////// |