blob: 91d81f029488014d9b40e5ba3e7b31687b61b9c0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
function test1() {
var BUGNUMBER = '';
var summary = '';
var actual = '';
test(BUGNUMBER);
function test() {
try {
(function () { eval("'foo'.b()", arguments) })();
} catch(ex) {
actual = ex + '';
}
}
assertEq(actual, 'TypeError: "foo".b is not a function');
}
test1();
function test2() {
var BUGNUMBER = '';
var summary = '';
function g() {
'use strict';
try {
eval('function foo() { var a, arguments, b;}');
} catch (x) {
return (x instanceof SyntaxError);
}
};
assertEq(g(), true);
}
test2();
|