-- v2: TRACE and test
From: Anders Kjersem andersdev@proton.me
--- programs/wscript/host.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/programs/wscript/host.c b/programs/wscript/host.c index 44336deac13..6bec73062e2 100644 --- a/programs/wscript/host.c +++ b/programs/wscript/host.c @@ -395,8 +395,10 @@ static HRESULT WINAPI Host_DisconnectObject(IHost *iface, IDispatch *Object)
static HRESULT WINAPI Host_Sleep(IHost *iface, LONG Time) { - WINE_FIXME("(%ld)\n", Time); - return E_NOTIMPL; + if (Time < 0) + return E_INVALIDARG; + Sleep(Time); + return S_OK; }
static HRESULT WINAPI Host_ConnectObject(IHost *iface, IDispatch *Object, BSTR Prefix)
From: Anders Kjersem andersdev@proton.me
--- programs/wscript/host.c | 1 + programs/wscript/tests/run.js | 5 +++++ 2 files changed, 6 insertions(+)
diff --git a/programs/wscript/host.c b/programs/wscript/host.c index 6bec73062e2..2e6ed964f63 100644 --- a/programs/wscript/host.c +++ b/programs/wscript/host.c @@ -395,6 +395,7 @@ static HRESULT WINAPI Host_DisconnectObject(IHost *iface, IDispatch *Object)
static HRESULT WINAPI Host_Sleep(IHost *iface, LONG Time) { + TRACE("(%ld)\n", Time); if (Time < 0) return E_INVALIDARG; Sleep(Time); diff --git a/programs/wscript/tests/run.js b/programs/wscript/tests/run.js index a812a85c9e0..0f8deb64c3b 100644 --- a/programs/wscript/tests/run.js +++ b/programs/wscript/tests/run.js @@ -48,6 +48,11 @@ ok(WScript.Interactive === false, "WScript.Interactive = " + WScript.Interactive WScript.Interactive = true; ok(WScript.Interactive === true, "WScript.Interactive = " + WScript.Interactive); ok(WScript.Application === WScript, "WScript.Application = " + WScript.Application); +ok(WScript.Sleep(0), "Sleep(0)"); +try { + WScript.Sleep(-1); + ok(false, "expected exception"); +}catch(e) {}
var obj = WScript.CreateObject("Wine.Test"); obj.ok(true, "Broken WScript.CreateObject object?");
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=147939
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
wscript.exe: run.c:171: Test failed: V_VT(psp->rgvargs+1) = 0 run.c:172: Test failed: test.JS: L"Sleep(0)"
=== w7u_el (32 bit report) ===
wscript.exe: run.c:171: Test failed: V_VT(psp->rgvargs+1) = 0 run.c:172: Test failed: test.JS: L"Sleep(0)"
=== w8 (32 bit report) ===
wscript.exe: run.c:171: Test failed: V_VT(psp->rgvargs+1) = 0 run.c:172: Test failed: test.JS: L"Sleep(0)"
=== w864 (32 bit report) ===
wscript.exe: run.c:171: Test failed: V_VT(psp->rgvargs+1) = 0 run.c:172: Test failed: test.JS: L"Sleep(0)"
=== w1064v1507 (32 bit report) ===
wscript.exe: run.c:171: Test failed: V_VT(psp->rgvargs+1) = 0 run.c:172: Test failed: test.JS: L"Sleep(0)"
=== w1064v1809 (32 bit report) ===
wscript.exe: run.c:171: Test failed: V_VT(psp->rgvargs+1) = 0 run.c:172: Test failed: test.JS: L"Sleep(0)"
=== w1064_tsign (32 bit report) ===
wscript.exe: run.c:171: Test failed: V_VT(psp->rgvargs+1) = 0 run.c:172: Test failed: test.JS: L"Sleep(0)"
=== w10pro64 (32 bit report) ===
wscript.exe: run.c:171: Test failed: V_VT(psp->rgvargs+1) = 0 run.c:172: Test failed: test.JS: L"Sleep(0)"
=== w10pro64_en_AE_u8 (32 bit report) ===
wscript.exe: run.c:171: Test failed: V_VT(psp->rgvargs+1) = 0 run.c:172: Test failed: test.JS: L"Sleep(0)"
=== w11pro64 (32 bit report) ===
wscript.exe: run.c:171: Test failed: V_VT(psp->rgvargs+1) = 0 run.c:172: Test failed: test.JS: L"Sleep(0)"
=== w7pro64 (64 bit report) ===
wscript.exe: run.c:171: Test failed: V_VT(psp->rgvargs+1) = 0 run.c:172: Test failed: test.JS: L"Sleep(0)"
=== w864 (64 bit report) ===
wscript.exe: run.c:171: Test failed: V_VT(psp->rgvargs+1) = 0 run.c:172: Test failed: test.JS: L"Sleep(0)"
=== w1064v1507 (64 bit report) ===
wscript.exe: run.c:171: Test failed: V_VT(psp->rgvargs+1) = 0 run.c:172: Test failed: test.JS: L"Sleep(0)"
=== w1064v1809 (64 bit report) ===
wscript.exe: run.c:171: Test failed: V_VT(psp->rgvargs+1) = 0 run.c:172: Test failed: test.JS: L"Sleep(0)"
=== w1064_2qxl (64 bit report) ===
wscript.exe: run.c:171: Test failed: V_VT(psp->rgvargs+1) = 0 run.c:172: Test failed: test.JS: L"Sleep(0)"
=== w1064_tsign (64 bit report) ===
wscript.exe: run.c:171: Test failed: V_VT(psp->rgvargs+1) = 0 run.c:172: Test failed: test.JS: L"Sleep(0)"
=== w10pro64 (64 bit report) ===
wscript.exe: run.c:171: Test failed: V_VT(psp->rgvargs+1) = 0 run.c:172: Test failed: test.JS: L"Sleep(0)"
=== w10pro64_ar (64 bit report) ===
wscript.exe: run.c:171: Test failed: V_VT(psp->rgvargs+1) = 0 run.c:172: Test failed: test.JS: L"Sleep(0)"
=== w10pro64_ja (64 bit report) ===
wscript.exe: run.c:171: Test failed: V_VT(psp->rgvargs+1) = 0 run.c:172: Test failed: test.JS: L"Sleep(0)"
=== w10pro64_zh_CN (64 bit report) ===
wscript.exe: run.c:171: Test failed: V_VT(psp->rgvargs+1) = 0 run.c:172: Test failed: test.JS: L"Sleep(0)"
=== w11pro64_amd (64 bit report) ===
wscript.exe: run.c:171: Test failed: V_VT(psp->rgvargs+1) = 0 run.c:172: Test failed: test.JS: L"Sleep(0)"
=== debian11 (32 bit report) ===
wscript.exe: run.c:171: Test failed: V_VT(psp->rgvargs+1) = 0 run.c:172: Test failed: test.JS: L"Sleep(0)"
=== debian11 (32 bit ar:MA report) ===
wscript.exe: run.c:171: Test failed: V_VT(psp->rgvargs+1) = 0 run.c:172: Test failed: test.JS: L"Sleep(0)"
=== debian11 (32 bit de report) ===
wscript.exe: run.c:171: Test failed: V_VT(psp->rgvargs+1) = 0 run.c:172: Test failed: test.JS: L"Sleep(0)"
=== debian11 (32 bit fr report) ===
wscript.exe: run.c:171: Test failed: V_VT(psp->rgvargs+1) = 0 run.c:172: Test failed: test.JS: L"Sleep(0)"
=== debian11 (32 bit he:IL report) ===
wscript.exe: run.c:171: Test failed: V_VT(psp->rgvargs+1) = 0 run.c:172: Test failed: test.JS: L"Sleep(0)"
=== debian11 (32 bit hi:IN report) ===
wscript.exe: run.c:171: Test failed: V_VT(psp->rgvargs+1) = 0 run.c:172: Test failed: test.JS: L"Sleep(0)"
=== debian11 (32 bit ja:JP report) ===
wscript.exe: run.c:171: Test failed: V_VT(psp->rgvargs+1) = 0 run.c:172: Test failed: test.JS: L"Sleep(0)"
=== debian11 (32 bit zh:CN report) ===
wscript.exe: run.c:171: Test failed: V_VT(psp->rgvargs+1) = 0 run.c:172: Test failed: test.JS: L"Sleep(0)"
=== debian11b (32 bit WoW report) ===
wscript.exe: run.c:171: Test failed: V_VT(psp->rgvargs+1) = 0 run.c:172: Test failed: test.JS: L"Sleep(0)"
=== debian11b (64 bit WoW report) ===
user32: input.c:5886: Test failed: got pos (49,51)
wscript.exe: run.c:171: Test failed: V_VT(psp->rgvargs+1) = 0 run.c:172: Test failed: test.JS: L"Sleep(0)"
Jacek Caban (@jacek) commented about programs/wscript/tests/run.js:
WScript.Interactive = true; ok(WScript.Interactive === true, "WScript.Interactive = " + WScript.Interactive); ok(WScript.Application === WScript, "WScript.Application = " + WScript.Application); +ok(WScript.Sleep(0), "Sleep(0)");
`Sleep` doesn't return value, so that would be `=== undefined` (or you could just drop `ok()` and just call it; it would be enough to ensure that there is no exception). Also please squash those commits into a single commit.