From bbac6de702dd971c248047a9c569bac0f3ae0739 Mon Sep 17 00:00:00 2001 From: Andrew Nguyen Date: Sun, 30 Nov 2008 06:40:43 -0600 Subject: [PATCH] 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 862dfb04038..5e93fa275dc 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 4b58e999dd5..1a0a88d213f 100644 --- a/dlls/jscript/tests/api.js +++ b/dlls/jscript/tests/api.js @@ -323,6 +323,15 @@ ok(tmp === "test", "'test'.small() = " + tmp); tmp = "test".small(3); ok(tmp === "test", "'test'.small(3) = " + tmp); +tmp = "".strike(); +ok(tmp === "", "''.strike() = " + tmp); +tmp = "".strike(3); +ok(tmp === "", "''.strike(3) = " + tmp); +tmp = "test".strike(); +ok(tmp === "test", "'test'.strike() = " + tmp); +tmp = "test".strike(3); +ok(tmp === "test", "'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");