Andrew Nguyen : jscript: Implement the String.strike() method.
Alexandre Julliard
julliard at winehq.org
Tue Dec 2 11:02:20 CST 2008
Module: wine
Branch: master
Commit: bbac6de702dd971c248047a9c569bac0f3ae0739
URL: http://source.winehq.org/git/wine.git/?a=commit;h=bbac6de702dd971c248047a9c569bac0f3ae0739
Author: Andrew Nguyen <arethusa26 at gmail.com>
Date: Sun Nov 30 06:40:43 2008 -0600
jscript: Implement the String.strike() 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 862dfb0..5e93fa2 100644
--- a/dlls/jscript/string.c
+++ b/dlls/jscript/string.c
@@ -997,8 +997,8 @@ static HRESULT String_split(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAM
static HRESULT String_strike(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp,
VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp)
{
- FIXME("\n");
- return E_NOTIMPL;
+ static const WCHAR striketagW[] = {'S','T','R','I','K','E',0};
+ return do_attributeless_tag_format(dispex, lcid, flags, dp, retv, ei, sp, striketagW);
}
static HRESULT String_sub(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp,
diff --git a/dlls/jscript/tests/api.js b/dlls/jscript/tests/api.js
index 4b58e99..1a0a88d 100644
--- a/dlls/jscript/tests/api.js
+++ b/dlls/jscript/tests/api.js
@@ -323,6 +323,15 @@ ok(tmp === "<SMALL>test</SMALL>", "'test'.small() = " + tmp);
tmp = "test".small(3);
ok(tmp === "<SMALL>test</SMALL>", "'test'.small(3) = " + tmp);
+tmp = "".strike();
+ok(tmp === "<STRIKE></STRIKE>", "''.strike() = " + tmp);
+tmp = "".strike(3);
+ok(tmp === "<STRIKE></STRIKE>", "''.strike(3) = " + tmp);
+tmp = "test".strike();
+ok(tmp === "<STRIKE>test</STRIKE>", "'test'.strike() = " + tmp);
+tmp = "test".strike(3);
+ok(tmp === "<STRIKE>test</STRIKE>", "'test'.strike(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