jscript: Implement the String.bold() method.
This commit is contained in:
parent
a8dff20f2e
commit
99f376dc4e
|
@ -174,8 +174,8 @@ static HRESULT String_blink(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAM
|
||||||
static HRESULT String_bold(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp,
|
static HRESULT String_bold(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp,
|
||||||
VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp)
|
VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp)
|
||||||
{
|
{
|
||||||
FIXME("\n");
|
static const WCHAR boldtagW[] = {'B',0};
|
||||||
return E_NOTIMPL;
|
return do_attributeless_tag_format(dispex, lcid, flags, dp, retv, ei, sp, boldtagW);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ECMA-262 3rd Edition 15.5.4.5 */
|
/* ECMA-262 3rd Edition 15.5.4.5 */
|
||||||
|
|
|
@ -287,6 +287,15 @@ ok(tmp === "<BLINK>test</BLINK>", "'test'.blink() = " + tmp);
|
||||||
tmp = "test".blink(3);
|
tmp = "test".blink(3);
|
||||||
ok(tmp === "<BLINK>test</BLINK>", "'test'.blink(3) = " + tmp);
|
ok(tmp === "<BLINK>test</BLINK>", "'test'.blink(3) = " + tmp);
|
||||||
|
|
||||||
|
tmp = "".bold();
|
||||||
|
ok(tmp === "<B></B>", "''.bold() = " + tmp);
|
||||||
|
tmp = "".bold(3);
|
||||||
|
ok(tmp === "<B></B>", "''.bold(3) = " + tmp);
|
||||||
|
tmp = "test".bold();
|
||||||
|
ok(tmp === "<B>test</B>", "'test'.bold() = " + tmp);
|
||||||
|
tmp = "test".bold(3);
|
||||||
|
ok(tmp === "<B>test</B>", "'test'.bold(3) = " + tmp);
|
||||||
|
|
||||||
var arr = new Array();
|
var arr = new Array();
|
||||||
ok(typeof(arr) === "object", "arr () is not object");
|
ok(typeof(arr) === "object", "arr () is not object");
|
||||||
ok((arr.length === 0), "arr.length is not 0");
|
ok((arr.length === 0), "arr.length is not 0");
|
||||||
|
|
Loading…
Reference in New Issue