[PATCH v3 2/2] winspool/tests: Test LastError on success of AddMonitor.
Huw Davies
huw at codeweavers.com
Wed Feb 8 03:03:45 CST 2017
From: Detlef Riekenberg <wine.dev at web.de>
Signed-off-by: Detlef Riekenberg <wine.dev at web.de>
Signed-off-by: Huw Davies <huw at codeweavers.com>
---
dlls/winspool.drv/tests/info.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/winspool.drv/tests/info.c b/dlls/winspool.drv/tests/info.c
index f6527c5..3c28bc0 100644
--- a/dlls/winspool.drv/tests/info.c
+++ b/dlls/winspool.drv/tests/info.c
@@ -434,7 +434,9 @@ static void test_AddMonitor(void)
mi2a.pDLLName = entry->dllname;
SetLastError(MAGIC_DEAD);
res = AddMonitorA(NULL, 2, (LPBYTE) &mi2a);
- ok(res, "returned %d with %d (expected '!= 0')\n", res, GetLastError());
+ /* Some apps depend on the result of GetLastError() also on success of AddMonitor */
+ ok(res && (GetLastError() == ERROR_SUCCESS),
+ "returned %d with %d (expected '!= 0' with ERROR_SUCCESS)\n", res, GetLastError());
/* add a monitor twice */
SetLastError(MAGIC_DEAD);
--
2.10.2
More information about the wine-patches
mailing list