From c80a23c639ded0e196a72f3b8ea46441d4ab24cf Mon Sep 17 00:00:00 2001 From: Andrew Nguyen Date: Sun, 30 Nov 2008 06:40:22 -0600 Subject: [PATCH] jscript: Implement the String.fixed() 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 426436bce5b..f99d9ad7324 100644 --- a/dlls/jscript/string.c +++ b/dlls/jscript/string.c @@ -329,8 +329,8 @@ static HRESULT String_concat(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARA static HRESULT String_fixed(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp) { - FIXME("\n"); - return E_NOTIMPL; + static const WCHAR fixedtagW[] = {'T','T',0}; + return do_attributeless_tag_format(dispex, lcid, flags, dp, retv, ei, sp, fixedtagW); } static HRESULT String_fontcolor(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp, diff --git a/dlls/jscript/tests/api.js b/dlls/jscript/tests/api.js index 4355d347ca2..c8e8d2c6c05 100644 --- a/dlls/jscript/tests/api.js +++ b/dlls/jscript/tests/api.js @@ -296,6 +296,15 @@ ok(tmp === "test", "'test'.bold() = " + tmp); tmp = "test".bold(3); ok(tmp === "test", "'test'.bold(3) = " + tmp); +tmp = "".fixed(); +ok(tmp === "", "''.fixed() = " + tmp); +tmp = "".fixed(3); +ok(tmp === "", "''.fixed(3) = " + tmp); +tmp = "test".fixed(); +ok(tmp === "test", "'test'.fixed() = " + tmp); +tmp = "test".fixed(3); +ok(tmp === "test", "'test'.fixed(3) = " + tmp); + var arr = new Array(); ok(typeof(arr) === "object", "arr () is not object"); ok((arr.length === 0), "arr.length is not 0");