mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-10-31 13:20:59 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			13 lines
		
	
	
	
		
			345 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
	
		
			345 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| test("basic that non-strict direct eval() prevents non-local access caching", () => {
 | |
|     function foo(do_eval) {
 | |
|         var c = 1;
 | |
|         function bar(do_eval) {
 | |
|             if (do_eval) eval("var c = 2;");
 | |
|             return c;
 | |
|         }
 | |
|         return bar(do_eval);
 | |
|     }
 | |
| 
 | |
|     expect(foo(false)).toBe(1);
 | |
|     expect(foo(true)).toBe(2);
 | |
| });
 | 
