mirror of
https://github.com/reactos/reactos.git
synced 2025-04-22 05:00:27 +00:00
[JSCRIPT_WINETEST] Sync with Wine Staging 4.0. CORE-15682
This commit is contained in:
parent
660f7b9090
commit
20f9fb6150
3 changed files with 60 additions and 1 deletions
|
@ -618,6 +618,28 @@ ok(r[0] === "1", "r[0] = " + r[0]);
|
|||
ok(r[1] === "2", "r[1] = " + r[1]);
|
||||
ok(r[2] === "3", "r[1] = " + r[1]);
|
||||
|
||||
r = "1,2,3".split(undefined);
|
||||
ok(typeof(r) === "object", "typeof(r) = " + typeof(r));
|
||||
ok(r.length === 1, "r.length = " + r.length);
|
||||
ok(r[0] === "1,2,3", "r[0] = " + r[0]);
|
||||
|
||||
r = "1,undefined2undefined,3".split(undefined);
|
||||
ok(typeof(r) === "object", "typeof(r) = " + typeof(r));
|
||||
ok(r.length === 3, "r.length = " + r.length);
|
||||
ok(r[0] === "1,", "r[0] = " + r[0]);
|
||||
ok(r[1] === "2", "r[1] = " + r[1]);
|
||||
ok(r[2] === ",3", "r[2] = " + r[2]);
|
||||
|
||||
r = "1,undefined2undefined,3".split();
|
||||
ok(typeof(r) === "object", "typeof(r) = " + typeof(r));
|
||||
ok(r.length === 1, "r.length = " + r.length);
|
||||
ok(r[0] === "1,undefined2undefined,3", "r[0] = " + r[0]);
|
||||
|
||||
r = "".split();
|
||||
ok(typeof(r) === "object", "typeof(r) = " + typeof(r));
|
||||
ok(r.length === 1, "r.length = " + r.length);
|
||||
ok(r[0] === "", "r[0] = " + r[0]);
|
||||
|
||||
tmp = "abcd".indexOf("bc",0);
|
||||
ok(tmp === 1, "indexOf = " + tmp);
|
||||
tmp = "abcd".indexOf("bc",1);
|
||||
|
|
|
@ -480,6 +480,20 @@ ok(obj3.prop1 === 1, "obj3.prop1 is not 1");
|
|||
ok(obj3.prop2 === "boolean", "obj3.prop2 is not \"boolean\"");
|
||||
ok(obj3.constructor === Object, "unexpected obj3.constructor");
|
||||
|
||||
if(invokeVersion >= 2) {
|
||||
eval("tmp = {prop: 'value',}");
|
||||
ok(tmp.prop === "value", "tmp.prop = " + tmp.prop);
|
||||
eval("tmp = {prop: 'value',second:2,}");
|
||||
ok(tmp.prop === "value", "tmp.prop = " + tmp.prop);
|
||||
}else {
|
||||
try {
|
||||
eval("tmp = {prop: 'value',}");
|
||||
}catch(e) {
|
||||
tmp = true;
|
||||
}
|
||||
ok(tmp === true, "exception not fired");
|
||||
}
|
||||
|
||||
{
|
||||
var blockVar = 1;
|
||||
blockVar = 2;
|
||||
|
@ -1146,6 +1160,27 @@ case 3:
|
|||
})();
|
||||
expect(ret, "ret");
|
||||
expect(x, "try,try2,finally2,finally,ret");
|
||||
|
||||
ret = (function() {
|
||||
try {
|
||||
return "try";
|
||||
unreachable();
|
||||
}catch(e) {
|
||||
unreachable();
|
||||
}finally {
|
||||
new Object();
|
||||
var tmp = (function() {
|
||||
var s = new String();
|
||||
try {
|
||||
s.length;
|
||||
}finally {
|
||||
return 1;
|
||||
}
|
||||
})();
|
||||
}
|
||||
unreachable();
|
||||
})();
|
||||
expect(ret, "try");
|
||||
})();
|
||||
|
||||
tmp = eval("1");
|
||||
|
@ -1797,6 +1832,8 @@ ok(tmp, "tmp = " + tmp);
|
|||
ok(x === undefined, "x = " + x);
|
||||
})();
|
||||
|
||||
var get, set;
|
||||
|
||||
/* NoNewline rule parser tests */
|
||||
while(true) {
|
||||
if(true) break
|
||||
|
|
|
@ -1316,7 +1316,7 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid,
|
|||
|
||||
case DISPID_GLOBAL_TESTARGTYPES: {
|
||||
VARIANT args[8], v;
|
||||
DISPPARAMS dp = {args, NULL, sizeof(args)/sizeof(*args), 0};
|
||||
DISPPARAMS dp = {args, NULL, ARRAY_SIZE(args), 0};
|
||||
HRESULT hres;
|
||||
|
||||
CHECK_EXPECT(global_testargtypes_i);
|
||||
|
|
Loading…
Reference in a new issue