From: Andrew Nguyen Date: Wed, 10 Dec 2008 09:07:46 +0000 (-0600) Subject: jscript: Implement the String.sup() method. X-Git-Tag: 1.0.10-eter3~4^2~5^2~2 X-Git-Url: http://git.etersoft.ru/projects/?a=commitdiff_plain;h=abedd774fbbf055692814492235d299ce9c4ad3c;p=wine%2Feterwine.git jscript: Implement the String.sup() method. --- diff --git a/dlls/jscript/string.c b/dlls/jscript/string.c index c0ee3115d9..eeceb1f693 100644 --- a/dlls/jscript/string.c +++ b/dlls/jscript/string.c @@ -1089,8 +1089,8 @@ static HRESULT String_substr(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARA static HRESULT String_sup(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp) { - FIXME("\n"); - return E_NOTIMPL; + static const WCHAR suptagW[] = {'S','U','P',0}; + return do_attributeless_tag_format(dispex, lcid, flags, dp, retv, ei, sp, suptagW); } static HRESULT String_toLowerCase(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp, diff --git a/dlls/jscript/tests/api.js b/dlls/jscript/tests/api.js index 72b64d26ca..2868c0f7ae 100644 --- a/dlls/jscript/tests/api.js +++ b/dlls/jscript/tests/api.js @@ -341,6 +341,15 @@ ok(tmp === "test", "'test'.sub() = " + tmp); tmp = "test".sub(3); ok(tmp === "test", "'test'.sub(3) = " + tmp); +tmp = "".sup(); +ok(tmp === "", "''.sup() = " + tmp); +tmp = "".sup(3); +ok(tmp === "", "''.sup(3) = " + tmp); +tmp = "test".sup(); +ok(tmp === "test", "'test'.sup() = " + tmp); +tmp = "test".sup(3); +ok(tmp === "test", "'test'.sup(3) = " + tmp); + var arr = new Array(); ok(typeof(arr) === "object", "arr () is not object"); ok((arr.length === 0), "arr.length is not 0");