Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
ec3d0e9b
Commit
ec3d0e9b
authored
Oct 19, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 19, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wscript: Added tests using vbscript.
parent
62b7069f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
4 deletions
+49
-4
rsrc.rc
programs/wscript/tests/rsrc.rc
+3
-0
run.c
programs/wscript/tests/run.c
+16
-4
run.vbs
programs/wscript/tests/run.vbs
+30
-0
No files found.
programs/wscript/tests/rsrc.rc
View file @
ec3d0e9b
...
...
@@ -18,3 +18,6 @@
/* @makedep: run.js */
run.js TESTSCRIPT "run.js"
/* @makedep: run.vbs */
run.vbs TESTSCRIPT "run.vbs"
programs/wscript/tests/run.c
View file @
ec3d0e9b
...
...
@@ -170,16 +170,28 @@ static HRESULT WINAPI Dispatch_Invoke(IDispatch *iface, DISPID dispIdMember, REF
WORD
wFlags
,
DISPPARAMS
*
pdp
,
VARIANT
*
pVarResult
,
EXCEPINFO
*
pExcepInfo
,
UINT
*
puArgErr
)
{
switch
(
dispIdMember
)
{
case
DISPID_TESTOBJ_OK
:
case
DISPID_TESTOBJ_OK
:
{
VARIANT
*
expr
,
*
msg
;
ok
(
wFlags
==
INVOKE_FUNC
,
"wFlags = %x
\n
"
,
wFlags
);
ok
(
pdp
->
cArgs
==
2
,
"cArgs = %d
\n
"
,
pdp
->
cArgs
);
ok
(
!
pdp
->
cNamedArgs
,
"cNamedArgs = %d
\n
"
,
pdp
->
cNamedArgs
);
ok
(
V_VT
(
pdp
->
rgvarg
)
==
VT_BSTR
,
"V_VT(psp->rgvargs) = %d
\n
"
,
V_VT
(
pdp
->
rgvarg
));
ok
(
V_VT
(
pdp
->
rgvarg
+
1
)
==
VT_BOOL
,
"V_VT(psp->rgvargs+1) = %d
\n
"
,
V_VT
(
pdp
->
rgvarg
));
ok
(
V_BOOL
(
pdp
->
rgvarg
+
1
),
"%s: %s
\n
"
,
script_name
,
wine_dbgstr_w
(
V_BSTR
(
pdp
->
rgvarg
)));
expr
=
pdp
->
rgvarg
+
1
;
if
(
V_VT
(
expr
)
==
(
VT_VARIANT
|
VT_BYREF
))
expr
=
V_VARIANTREF
(
expr
);
msg
=
pdp
->
rgvarg
;
if
(
V_VT
(
msg
)
==
(
VT_VARIANT
|
VT_BYREF
))
msg
=
V_VARIANTREF
(
msg
);
ok
(
V_VT
(
msg
)
==
VT_BSTR
,
"V_VT(psp->rgvargs) = %d
\n
"
,
V_VT
(
msg
));
ok
(
V_VT
(
expr
)
==
VT_BOOL
,
"V_VT(psp->rgvargs+1) = %d
\n
"
,
V_VT
(
expr
));
ok
(
V_BOOL
(
expr
),
"%s: %s
\n
"
,
script_name
,
wine_dbgstr_w
(
V_BSTR
(
msg
)));
if
(
pVarResult
)
V_VT
(
pVarResult
)
=
VT_EMPTY
;
break
;
}
case
DISPID_TESTOBJ_TRACE
:
ok
(
wFlags
==
INVOKE_FUNC
,
"wFlags = %x
\n
"
,
wFlags
);
ok
(
pdp
->
cArgs
==
1
,
"cArgs = %d
\n
"
,
pdp
->
cArgs
);
...
...
programs/wscript/tests/run.vbs
0 → 100644
View file @
ec3d0e9b
'
' Copyright 2011 Jacek Caban for CodeWeavers
'
' This library is free software; you can redistribute it and/or
' modify it under the terms of the GNU Lesser General Public
' License as published by the Free Software Foundation; either
' version 2.1 of the License, or (at your option) any later version.
'
' This library is distributed in the hope that it will be useful,
' but WITHOUT ANY WARRANTY; without even the implied warranty of
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
' Lesser General Public License for more details.
'
' You should have received a copy of the GNU Lesser General Public
' License along with this library; if not, write to the Free Software
' Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
'
Option
Explicit
Dim
winetest
Set
winetest
=
CreateObject
(
"Wine.Test"
)
Sub
ok
(
expr
,
msg
)
Call
winetest
.
ok
(
expr
,
msg
)
End
Sub
Call
ok
(
WScript
is
WSH
,
"WScript is not WSH"
)
Call
winetest
.
reportSuccess
()
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