Piotr Caban : vbscript/tests: Expose todo_wine_ok function to scripts.
Alexandre Julliard
julliard at winehq.org
Tue Oct 10 14:41:20 CDT 2017
Module: wine
Branch: master
Commit: c4d72438334b83177d75681edf6931958b702a7a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c4d72438334b83177d75681edf6931958b702a7a
Author: Piotr Caban <piotr at codeweavers.com>
Date: Tue Oct 10 17:08:05 2017 +0200
vbscript/tests: Expose todo_wine_ok function to scripts.
Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/vbscript/tests/error.vbs | 12 ++++++------
dlls/vbscript/tests/run.c | 10 +++++++++-
2 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/dlls/vbscript/tests/error.vbs b/dlls/vbscript/tests/error.vbs
index 3bf03df..78314c3 100644
--- a/dlls/vbscript/tests/error.vbs
+++ b/dlls/vbscript/tests/error.vbs
@@ -190,7 +190,7 @@ sub testThrow
next
call ok(x = 2, "x = " & x)
call ok(y = 1, "y = " & y)
- 'todo_wine call ok(Err.Number = VB_E_OBJNOTCOLLECTION, "Err.Number = " & Err.Number)
+ call todo_wine_ok(Err.Number = VB_E_OBJNOTCOLLECTION, "Err.Number = " & Err.Number)
Err.clear()
y = 0
@@ -202,19 +202,19 @@ sub testThrow
next
call ok(y = 1, "y = " & y)
call ok(x = 6, "x = " & x)
- 'todo_wine call ok(Err.Number = VB_E_FORLOOPNOTINITIALIZED, "Err.Number = " & Err.Number)
+ call todo_wine_ok(Err.Number = VB_E_FORLOOPNOTINITIALIZED, "Err.Number = " & Err.Number)
Err.clear()
y = 0
x = 6
for x = 100 to throwInt(E_TESTERROR)
call ok(Err.Number = E_TESTERROR, "Err.Number = " & Err.Number)
- 'todo_wine call ok(x = 6, "x = " & x)
+ call todo_wine_ok(x = 6, "x = " & x)
y = y+1
next
call ok(y = 1, "y = " & y)
- 'todo_wine call ok(x = 6, "x = " & x)
- 'todo_wine call ok(Err.Number = VB_E_FORLOOPNOTINITIALIZED, "Err.Number = " & Err.Number)
+ call todo_wine_ok(x = 6, "x = " & x)
+ call todo_wine_ok(Err.Number = VB_E_FORLOOPNOTINITIALIZED, "Err.Number = " & Err.Number)
select case throwInt(E_TESTERROR)
case true
@@ -308,7 +308,7 @@ sub testForEachError()
y = true
next
call ok(y, "for each not executed")
- 'todo_wine call ok(Err.Number = VB_E_OBJNOTCOLLECTION, "Err.Number = " & Err.Number)
+ call todo_wine_ok(Err.Number = VB_E_OBJNOTCOLLECTION, "Err.Number = " & Err.Number)
end sub
call testForEachError()
diff --git a/dlls/vbscript/tests/run.c b/dlls/vbscript/tests/run.c
index 798992f..81b1ced 100644
--- a/dlls/vbscript/tests/run.c
+++ b/dlls/vbscript/tests/run.c
@@ -122,6 +122,7 @@ DEFINE_EXPECT(OnScriptError);
#define DISPID_GLOBAL_TESTOPTIONALARG 1017
#define DISPID_GLOBAL_LETOBJ 1018
#define DISPID_GLOBAL_SETOBJ 1019
+#define DISPID_GLOBAL_TODO_WINE_OK 1020
#define DISPID_TESTOBJ_PROPGET 2000
#define DISPID_TESTOBJ_PROPPUT 2001
@@ -983,6 +984,11 @@ static HRESULT WINAPI Global_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD
*pid = DISPID_GLOBAL_OK;
return S_OK;
}
+ if(!strcmp_wa(bstrName, "todo_wine_ok")) {
+ test_grfdex(grfdex, fdexNameCaseInsensitive);
+ *pid = DISPID_GLOBAL_TODO_WINE_OK;
+ return S_OK;
+ }
if(!strcmp_wa(bstrName, "trace")) {
test_grfdex(grfdex, fdexNameCaseInsensitive);
*pid = DISPID_GLOBAL_TRACE;
@@ -1092,6 +1098,7 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid,
VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
{
switch(id) {
+ case DISPID_GLOBAL_TODO_WINE_OK:
case DISPID_GLOBAL_OK: {
VARIANT *b;
@@ -1115,7 +1122,8 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid,
ok(V_VT(b) == VT_BOOL, "V_VT(b) = %d\n", V_VT(b));
- ok(V_BOOL(b), "%s: %s\n", test_name, wine_dbgstr_w(V_BSTR(pdp->rgvarg)));
+ todo_wine_if(id == DISPID_GLOBAL_TODO_WINE_OK)
+ ok(V_BOOL(b), "%s: %s\n", test_name, wine_dbgstr_w(V_BSTR(pdp->rgvarg)));
return S_OK;
}
More information about the wine-cvs
mailing list