Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
9848d6be
Commit
9848d6be
authored
Sep 15, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 15, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Added interp_nothing implementation and tests.
parent
8864c8db
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
2 deletions
+41
-2
interp.c
dlls/vbscript/interp.c
+7
-2
lang.vbs
dlls/vbscript/tests/lang.vbs
+5
-0
run.c
dlls/vbscript/tests/run.c
+29
-0
No files found.
dlls/vbscript/interp.c
View file @
9848d6be
...
...
@@ -599,8 +599,13 @@ static HRESULT interp_null(exec_ctx_t *ctx)
static
HRESULT
interp_nothing
(
exec_ctx_t
*
ctx
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
VARIANT
v
;
TRACE
(
"
\n
"
);
V_VT
(
&
v
)
=
VT_DISPATCH
;
V_DISPATCH
(
&
v
)
=
NULL
;
return
stack_push
(
ctx
,
&
v
);
}
static
HRESULT
interp_not
(
exec_ctx_t
*
ctx
)
...
...
dlls/vbscript/tests/lang.vbs
View file @
9848d6be
...
...
@@ -71,9 +71,14 @@ Call ok(getVT(1 & 100000) = "VT_BSTR", "getVT(1 & 100000) is not VT_BSTR")
Call
ok
(
getVT
(
-
empty
)
=
"VT_I2"
,
"getVT(-empty) = "
&
getVT
(
-
empty
))
Call
ok
(
getVT
(
-
null
)
=
"VT_NULL"
,
"getVT(-null) = "
&
getVT
(
-
null
))
Call
ok
(
getVT
(
y
)
=
"VT_EMPTY*"
,
"getVT(y) = "
&
getVT
(
y
))
Call
ok
(
getVT
(
nothing
)
=
"VT_DISPATCH"
,
"getVT(nothing) = "
&
getVT
(
nothing
))
set
x
=
nothing
Call
ok
(
getVT
(
x
)
=
"VT_DISPATCH*"
,
"getVT(x=nothing) = "
&
getVT
(
x
))
x
=
true
Call
ok
(
getVT
(
x
)
=
"VT_BOOL*"
,
"getVT(x) = "
&
getVT
(
x
))
Call
ok
(
isNullDisp
(
nothing
),
"nothing is not nulldisp?"
)
x
=
"xx"
Call
ok
(
"ab"
&
"cd"
=
"abcd"
,
"
""
ab
""
&
""
cd
""
<>
""
abcd
""
"
)
Call
ok
(
"ab "
&
null
=
"ab "
,
"
""
ab
""
& null = "
&
(
"ab "
&
null
))
...
...
dlls/vbscript/tests/run.c
View file @
9848d6be
...
...
@@ -70,6 +70,7 @@ DEFINE_EXPECT(testobj_propput_i);
#define DISPID_GLOBAL_ISENGLOC 1004
#define DISPID_GLOBAL_VBVAR 1005
#define DISPID_GLOBAL_TESTOBJ 1006
#define DISPID_GLOBAL_ISNULLDISP 1007
#define DISPID_TESTOBJ_PROPPUT 2001
...
...
@@ -329,6 +330,12 @@ static HRESULT WINAPI Global_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD
*
pid
=
DISPID_GLOBAL_VBVAR
;
return
S_OK
;
}
if
(
!
strcmp_wa
(
bstrName
,
"isNullDisp"
))
{
test_grfdex
(
grfdex
,
fdexNameCaseInsensitive
);
*
pid
=
DISPID_GLOBAL_ISNULLDISP
;
return
S_OK
;
}
if
(
strict_dispid_check
&&
strcmp_wa
(
bstrName
,
"x"
))
ok
(
0
,
"unexpected call %s %x
\n
"
,
wine_dbgstr_w
(
bstrName
),
grfdex
);
...
...
@@ -459,6 +466,28 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid,
V_VT
(
pvarRes
)
=
VT_DISPATCH
;
V_DISPATCH
(
pvarRes
)
=
(
IDispatch
*
)
&
testObj
;
return
S_OK
;
case
DISPID_GLOBAL_ISNULLDISP
:
{
VARIANT
*
v
;
ok
(
wFlags
==
(
INVOKE_FUNC
|
INVOKE_PROPERTYGET
),
"wFlags = %x
\n
"
,
wFlags
);
ok
(
pdp
!=
NULL
,
"pdp == NULL
\n
"
);
ok
(
pdp
->
rgvarg
!=
NULL
,
"rgvarg == NULL
\n
"
);
ok
(
!
pdp
->
rgdispidNamedArgs
,
"rgdispidNamedArgs != NULL
\n
"
);
ok
(
pdp
->
cArgs
==
1
,
"cArgs = %d
\n
"
,
pdp
->
cArgs
);
ok
(
!
pdp
->
cNamedArgs
,
"cNamedArgs = %d
\n
"
,
pdp
->
cNamedArgs
);
ok
(
pvarRes
!=
NULL
,
"pvarRes == NULL
\n
"
);
ok
(
pei
!=
NULL
,
"pei == NULL
\n
"
);
v
=
pdp
->
rgvarg
;
if
(
V_VT
(
v
)
==
(
VT_VARIANT
|
VT_BYREF
))
v
=
V_VARIANTREF
(
v
);
ok
(
V_VT
(
v
)
==
VT_DISPATCH
,
"V_VT(psp->rgvargs) = %d
\n
"
,
V_VT
(
pdp
->
rgvarg
));
V_VT
(
pvarRes
)
=
VT_BOOL
;
V_BOOL
(
pvarRes
)
=
V_DISPATCH
(
v
)
?
VARIANT_FALSE
:
VARIANT_TRUE
;
return
S_OK
;
}
}
ok
(
0
,
"unexpected call %d
\n
"
,
id
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment