Commit c4d72438 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

vbscript/tests: Expose todo_wine_ok function to scripts.

parent 775671c3
......@@ -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()
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment