diff --git a/programs/wscript/arguments.c b/programs/wscript/arguments.c index 62d6ad05c26..b50ed94528c 100644 --- a/programs/wscript/arguments.c +++ b/programs/wscript/arguments.c @@ -110,8 +110,10 @@ static HRESULT WINAPI Arguments2_Item(IArguments2 *iface, LONG index, BSTR *out_ static HRESULT WINAPI Arguments2_Count(IArguments2 *iface, LONG *out_Count) { - WINE_FIXME("(%p)\n", out_Count); - return E_NOTIMPL; + WINE_TRACE("(%p)\n", out_Count); + + *out_Count = numOfArgs; + return S_OK; } static HRESULT WINAPI Arguments2_get_length(IArguments2 *iface, LONG *out_Count) diff --git a/programs/wscript/tests/run.js b/programs/wscript/tests/run.js index 4b6014ed061..dde3caf12fc 100644 --- a/programs/wscript/tests/run.js +++ b/programs/wscript/tests/run.js @@ -40,5 +40,6 @@ try { WScript.Arguments.Item(3); ok(false, "expected exception"); }catch(e) {} +ok(WScript.Arguments.Count() === 3, "WScript.Arguments.Count() = " + WScript.Arguments.Count()); winetest.reportSuccess();