mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 04:39:45 +00:00
jscript: Implement the String.sub() method.
This commit is contained in:
parent
f2388d9269
commit
257e15da39
@ -1004,8 +1004,8 @@ static HRESULT String_strike(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARA
|
||||
static HRESULT String_sub(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp,
|
||||
VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp)
|
||||
{
|
||||
FIXME("\n");
|
||||
return E_NOTIMPL;
|
||||
static const WCHAR subtagW[] = {'S','U','B',0};
|
||||
return do_attributeless_tag_format(dispex, lcid, flags, dp, retv, ei, sp, subtagW);
|
||||
}
|
||||
|
||||
/* ECMA-262 3rd Edition 15.5.4.15 */
|
||||
|
@ -332,6 +332,15 @@ ok(tmp === "<STRIKE>test</STRIKE>", "'test'.strike() = " + tmp);
|
||||
tmp = "test".strike(3);
|
||||
ok(tmp === "<STRIKE>test</STRIKE>", "'test'.strike(3) = " + tmp);
|
||||
|
||||
tmp = "".sub();
|
||||
ok(tmp === "<SUB></SUB>", "''.sub() = " + tmp);
|
||||
tmp = "".sub(3);
|
||||
ok(tmp === "<SUB></SUB>", "''.sub(3) = " + tmp);
|
||||
tmp = "test".sub();
|
||||
ok(tmp === "<SUB>test</SUB>", "'test'.sub() = " + tmp);
|
||||
tmp = "test".sub(3);
|
||||
ok(tmp === "<SUB>test</SUB>", "'test'.sub(3) = " + tmp);
|
||||
|
||||
var arr = new Array();
|
||||
ok(typeof(arr) === "object", "arr () is not object");
|
||||
ok((arr.length === 0), "arr.length is not 0");
|
||||
|
Loading…
Reference in New Issue
Block a user