Andrew Nguyen : jscript: Implement the String.italics() method.
Alexandre Julliard
julliard at winehq.org
Tue Dec 2 11:02:17 CST 2008
Module: wine
Branch: master
Commit: edba282951c07966273118e261b4b7fdef15efd5
URL: http://source.winehq.org/git/wine.git/?a=commit;h=edba282951c07966273118e261b4b7fdef15efd5
Author: Andrew Nguyen <arethusa26 at gmail.com>
Date: Sun Nov 30 06:40:30 2008 -0600
jscript: Implement the String.italics() method.
---
dlls/jscript/string.c | 4 ++--
dlls/jscript/tests/api.js | 9 +++++++++
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/dlls/jscript/string.c b/dlls/jscript/string.c
index f99d9ad..5afbe46 100644
--- a/dlls/jscript/string.c
+++ b/dlls/jscript/string.c
@@ -418,8 +418,8 @@ static HRESULT String_indexOf(DispatchEx *dispex, LCID lcid, WORD flags, DISPPAR
static HRESULT String_italics(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp,
VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp)
{
- FIXME("\n");
- return E_NOTIMPL;
+ static const WCHAR italicstagW[] = {'I',0};
+ return do_attributeless_tag_format(dispex, lcid, flags, dp, retv, ei, sp, italicstagW);
}
static HRESULT String_lastIndexOf(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp,
diff --git a/dlls/jscript/tests/api.js b/dlls/jscript/tests/api.js
index c8e8d2c..d8df87f 100644
--- a/dlls/jscript/tests/api.js
+++ b/dlls/jscript/tests/api.js
@@ -305,6 +305,15 @@ ok(tmp === "<TT>test</TT>", "'test'.fixed() = " + tmp);
tmp = "test".fixed(3);
ok(tmp === "<TT>test</TT>", "'test'.fixed(3) = " + tmp);
+tmp = "".italics();
+ok(tmp === "<I></I>", "''.italics() = " + tmp);
+tmp = "".italics(3);
+ok(tmp === "<I></I>", "''.italics(3) = " + tmp);
+tmp = "test".italics();
+ok(tmp === "<I>test</I>", "'test'.italics() = " + tmp);
+tmp = "test".italics(3);
+ok(tmp === "<I>test</I>", "'test'.italics(3) = " + tmp);
+
var arr = new Array();
ok(typeof(arr) === "object", "arr () is not object");
ok((arr.length === 0), "arr.length is not 0");
More information about the wine-cvs
mailing list