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
b0ef2959
Commit
b0ef2959
authored
Feb 15, 2013
by
Piotr Caban
Committed by
Alexandre Julliard
Feb 15, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Added IRegExp2_QueryInterface tests.
parent
63d27b54
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
344 additions
and
0 deletions
+344
-0
.gitignore
.gitignore
+1
-0
Makefile.in
dlls/vbscript/tests/Makefile.in
+2
-0
vbscript.c
dlls/vbscript/tests/vbscript.c
+37
-0
vbscript_defs.h
dlls/vbscript/tests/vbscript_defs.h
+33
-0
vbsregexp55.idl
dlls/vbscript/tests/vbsregexp55.idl
+271
-0
No files found.
.gitignore
View file @
b0ef2959
...
...
@@ -136,6 +136,7 @@ dlls/urlmon/urlmon_urlmon.h
dlls/urlmon/urlmon_urlmon_p.c
dlls/vbscript/parser.tab.c
dlls/vbscript/parser.tab.h
dlls/vbscript/tests/vbsregexp55.h
dlls/vbscript/vbscript_classes.h
dlls/vbscript/vbsglobal.h
dlls/vbscript/vbsregexp55.h
...
...
dlls/vbscript/tests/Makefile.in
View file @
b0ef2959
...
...
@@ -6,6 +6,8 @@ C_SRCS = \
run.c
\
vbscript.c
IDL_H_SRCS
=
vbsregexp55.idl
RC_SRCS
=
rsrc.rc
@MAKE_TEST_RULES@
dlls/vbscript/tests/vbscript.c
View file @
b0ef2959
...
...
@@ -25,6 +25,8 @@
#include <objsafe.h>
#include <dispex.h>
#include "vbsregexp55.h"
#include "wine/test.h"
#ifdef _WIN64
...
...
@@ -84,6 +86,7 @@ DEFINE_EXPECT(OnEnterScript);
DEFINE_EXPECT
(
OnLeaveScript
);
DEFINE_GUID
(
CLSID_VBScript
,
0xb54f3741
,
0x5b07
,
0x11cf
,
0xa4
,
0xb0
,
0x00
,
0xaa
,
0x00
,
0x4a
,
0x55
,
0xe8
);
DEFINE_GUID
(
CLSID_VBScriptRegExp
,
0x3f4daca4
,
0x160d
,
0x11d2
,
0xa8
,
0xe9
,
0x00
,
0x10
,
0x4b
,
0x36
,
0x5c
,
0x9f
);
static
BSTR
a2bstr
(
const
char
*
str
)
{
...
...
@@ -791,6 +794,39 @@ static void test_vbscript_initializing(void)
ok
(
!
ref
,
"ref = %d
\n
"
,
ref
);
}
static
void
test_RegExp
(
void
)
{
IRegExp2
*
regexp
;
IUnknown
*
unk
;
HRESULT
hres
;
hres
=
CoCreateInstance
(
&
CLSID_VBScriptRegExp
,
NULL
,
CLSCTX_INPROC_SERVER
|
CLSCTX_INPROC_HANDLER
,
&
IID_IUnknown
,
(
void
**
)
&
unk
);
if
(
hres
==
REGDB_E_CLASSNOTREG
)
{
win_skip
(
"VBScriptRegExp is not registered
\n
"
);
return
;
}
ok
(
hres
==
S_OK
,
"CoCreateInstance(CLSID_VBScriptRegExp) failed: %x
\n
"
,
hres
);
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IRegExp2
,
(
void
**
)
&
regexp
);
if
(
hres
==
E_NOINTERFACE
)
{
win_skip
(
"IRegExp2 interface is not available
\n
"
);
return
;
}
ok
(
hres
==
S_OK
,
"QueryInterface(IID_IRegExp2) failed: %x
\n
"
,
hres
);
IUnknown_Release
(
unk
);
hres
=
IRegExp2_QueryInterface
(
regexp
,
&
IID_IRegExp
,
(
void
**
)
&
unk
);
ok
(
hres
==
S_OK
,
"QueryInterface(IID_IRegExp) returned %x
\n
"
,
hres
);
IUnknown_Release
(
unk
);
hres
=
IRegExp2_QueryInterface
(
regexp
,
&
IID_IDispatchEx
,
(
void
**
)
&
unk
);
ok
(
hres
==
E_NOINTERFACE
,
"QueryInterface(IID_IDispatchEx) returned %x
\n
"
,
hres
);
IRegExp2_Release
(
regexp
);
}
static
BOOL
check_vbscript
(
void
)
{
IActiveScriptParseProcedure2
*
vbscript
;
...
...
@@ -815,6 +851,7 @@ START_TEST(vbscript)
test_vbscript_simplecreate
();
test_vbscript_initializing
();
test_scriptdisp
();
test_RegExp
();
}
else
{
win_skip
(
"VBScript engine not available or too old
\n
"
);
}
...
...
dlls/vbscript/tests/vbscript_defs.h
0 → 100644
View file @
b0ef2959
/*
* 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
*/
#define DISPID_SUBMATCHES_COUNT 1
#define DISPID_MATCHCOLLECTION_COUNT 1
#define DISPID_MATCH_FIRSTINDEX 10001
#define DISPID_MATCH_LENGTH 10002
#define DISPID_MATCH_SUBMATCHES 10003
#define DISPID_REGEXP_PATTERN 10001
#define DISPID_REGEXP_IGNORECASE 10002
#define DISPID_REGEXP_GLOBAL 10003
#define DISPID_REGEXP_EXECUTE 10004
#define DISPID_REGEXP_TEST 10005
#define DISPID_REGEXP_REPLACE 10006
#define DISPID_REGEXP_MULTILINE 10007
dlls/vbscript/tests/vbsregexp55.idl
0 → 100644
View file @
b0ef2959
/*
*
Copyright
2013
Piotr
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
*/
import
"oaidl.idl"
;
#
include
"vbscript_defs.h"
[
helpstring
(
"Microsoft VBScript Regular Expressions 5.5"
),
id
(
3
),
uuid
(
3
f4daca7
-160d-11
d2
-
a8e9
-
00104b365
c9f
),
version
(
5.5
)
]
library
VBScript_RegExp_55
{
importlib
(
"stdole2.tlb"
)
;
[
dual
,
hidden
,
nonextensible
,
odl
,
oleautomation
,
uuid
(
3
f4daca0
-160d-11
d2
-
a8e9
-
00104b365
c9f
),
]
interface
IRegExp
:
IDispatch
{
[
id
(
DISPID_REGEXP_PATTERN
),
propget
]
HRESULT
Pattern
(
[
out
,
retval
]
BSTR
*
pPattern
)
;
[
id
(
DISPID_REGEXP_PATTERN
),
propput
]
HRESULT
Pattern
(
[
in
]
BSTR
pPattern
)
;
[
id
(
DISPID_REGEXP_IGNORECASE
),
propget
]
HRESULT
IgnoreCase
(
[
out
,
retval
]
VARIANT_BOOL
*
pIgnoreCase
)
;
[
id
(
DISPID_REGEXP_IGNORECASE
),
propput
]
HRESULT
IgnoreCase
(
[
in
]
VARIANT_BOOL
pIgnoreCase
)
;
[
id
(
DISPID_REGEXP_GLOBAL
),
propget
]
HRESULT
Global
(
[
out
,
retval
]
VARIANT_BOOL
*
pGlobal
)
;
[
id
(
DISPID_REGEXP_GLOBAL
),
propput
]
HRESULT
Global
(
[
in
]
VARIANT_BOOL
pGlobal
)
;
[
id
(
DISPID_REGEXP_EXECUTE
)
]
HRESULT
Execute
(
[
in
]
BSTR
sourceString
,
[
out
,
retval
]
IDispatch
**
ppMatches
)
;
[
id
(
DISPID_REGEXP_TEST
)
]
HRESULT
Test
(
[
in
]
BSTR
sourceString
,
[
out
,
retval
]
VARIANT_BOOL
*
pMatch
)
;
[
id
(
DISPID_REGEXP_REPLACE
)
]
HRESULT
Replace
(
[
in
]
BSTR
sourceString
,
[
in
]
BSTR
replaceString
,
[
out
,
retval
]
BSTR
*
pDestString
)
;
}
[
dual
,
hidden
,
nonextensible
,
odl
,
oleautomation
,
uuid
(
3
f4dacb0
-160d-11
d2
-
a8e9
-
00104b365
c9f
)
]
interface
IRegExp2
:
IDispatch
{
[
id
(
DISPID_REGEXP_PATTERN
),
propget
]
HRESULT
Pattern
(
[
out
,
retval
]
BSTR
*
pPattern
)
;
[
id
(
DISPID_REGEXP_PATTERN
),
propput
]
HRESULT
Pattern
(
[
in
]
BSTR
pPattern
)
;
[
id
(
DISPID_REGEXP_IGNORECASE
),
propget
]
HRESULT
IgnoreCase
(
[
out
,
retval
]
VARIANT_BOOL
*
pIgnoreCase
)
;
[
id
(
DISPID_REGEXP_IGNORECASE
),
propput
]
HRESULT
IgnoreCase
(
[
in
]
VARIANT_BOOL
pIgnoreCase
)
;
[
id
(
DISPID_REGEXP_GLOBAL
),
propget
]
HRESULT
Global
(
[
out
,
retval
]
VARIANT_BOOL
*
pGlobal
)
;
[
id
(
DISPID_REGEXP_GLOBAL
),
propput
]
HRESULT
Global
(
[
in
]
VARIANT_BOOL
pGlobal
)
;
[
id
(
DISPID_REGEXP_MULTILINE
),
propget
]
HRESULT
Multiline
(
[
out
,
retval
]
VARIANT_BOOL
*
pMultiline
)
;
[
id
(
DISPID_REGEXP_MULTILINE
),
propput
]
HRESULT
Multiline
(
[
in
]
VARIANT_BOOL
pMultiline
)
;
[
id
(
DISPID_REGEXP_EXECUTE
)
]
HRESULT
Execute
(
[
in
]
BSTR
sourceString
,
[
out
,
retval
]
IDispatch
**
ppMatches
)
;
[
id
(
DISPID_REGEXP_TEST
)
]
HRESULT
Test
(
[
in
]
BSTR
sourceString
,
[
out
,
retval
]
VARIANT_BOOL
*
pMatch
)
;
[
id
(
DISPID_REGEXP_REPLACE
)
]
HRESULT
Replace
(
[
in
]
BSTR
sourceString
,
[
in
]
VARIANT
replaceVar
,
[
out
,
retval
]
BSTR
*
pDestString
)
;
}
[
dual
,
hidden
,
nonextensible
,
odl
,
oleautomation
,
uuid
(
3
f4daca1
-160d-11
d2
-
a8e9
-
00104b365
c9f
)
]
interface
IMatch
:
IDispatch
{
[
id
(
DISPID_VALUE
),
propget
]
HRESULT
Value
(
[
out
,
retval
]
BSTR
*
pValue
)
;
[
id
(
DISPID_MATCH_FIRSTINDEX
),
propget
]
HRESULT
FirstIndex
(
[
out
,
retval
]
LONG
*
pFirstIndex
)
;
[
id
(
DISPID_MATCH_LENGTH
),
propget
]
HRESULT
Length
(
[
out
,
retval
]
LONG
*
pLength
)
;
}
[
odl
,
uuid
(
3
f4dacb1
-160d-11
d2
-
a8e9
-
00104b365
c9f
),
hidden
,
dual
,
nonextensible
,
oleautomation
]
interface
IMatch2
:
IDispatch
{
[
id
(
DISPID_VALUE
),
propget
]
HRESULT
Value
(
[
out
,
retval
]
BSTR
*
pValue
)
;
[
id
(
DISPID_MATCH_FIRSTINDEX
),
propget
]
HRESULT
FirstIndex
(
[
out
,
retval
]
LONG
*
pFirstIndex
)
;
[
id
(
DISPID_MATCH_LENGTH
),
propget
]
HRESULT
Length
(
[
out
,
retval
]
LONG
*
pLength
)
;
[
id
(
DISPID_MATCH_SUBMATCHES
),
propget
]
HRESULT
SubMatches
(
[
out
,
retval
]
IDispatch
**
ppSubMatches
)
;
}
[
dual
,
hidden
,
nonextensible
,
odl
,
oleautomation
,
uuid
(
3
f4daca2
-160d-11
d2
-
a8e9
-
00104b365
c9f
)
]
interface
IMatchCollection
:
IDispatch
{
[
id
(
DISPID_VALUE
),
propget
]
HRESULT
Item
(
[
in
]
LONG
index
,
[
out
,
retval
]
IDispatch
**
ppMatch
)
;
[
id
(
DISPID_MATCHCOLLECTION_COUNT
),
propget
]
HRESULT
Count
(
[
out
,
retval
]
LONG
*
pCount
)
;
[
id
(
DISPID_NEWENUM
),
propget
]
HRESULT
_NewEnum
(
[
out
,
retval
]
IUnknown
**
ppEnum
)
;
}
[
dual
,
hidden
,
nonextensible
,
odl
,
oleautomation
,
uuid
(
3
f4dacb2
-160d-11
d2
-
a8e9
-
00104b365
c9f
)
]
interface
IMatchCollection2
:
IDispatch
{
[
id
(
DISPID_VALUE
),
propget
]
HRESULT
Item
(
[
in
]
LONG
index
,
[
out
,
retval
]
IDispatch
**
ppMatch
)
;
[
id
(
DISPID_MATCHCOLLECTION_COUNT
),
propget
]
HRESULT
Count
(
[
out
,
retval
]
LONG
*
pCount
)
;
[
id
(
DISPID_NEWENUM
),
propget
]
HRESULT
_NewEnum
(
[
out
,
retval
]
IUnknown
**
ppEnum
)
;
}
[
dual
,
hidden
,
nonextensible
,
odl
,
oleautomation
,
uuid
(
3
f4dacb3
-160d-11
d2
-
a8e9
-
00104b365
c9f
)
]
interface
ISubMatches
:
IDispatch
{
[
id
(
DISPID_VALUE
),
propget
]
HRESULT
Item
(
[
in
]
LONG
index
,
[
out
,
retval
]
VARIANT
*
pSubMatch
)
;
[
id
(
DISPID_SUBMATCHES_COUNT
),
propget
]
HRESULT
Count
(
[
out
,
retval
]
LONG
*
pCount
)
;
[
id
(
DISPID_NEWENUM
),
propget
]
HRESULT
_NewEnum
(
[
out
,
retval
]
IUnknown
**
ppEnum
)
;
}
[
uuid
(
3
f4daca4
-160d-11
d2
-
a8e9
-
00104b365
c9f
)
]
coclass
RegExp
{
[
default
]
interface
IRegExp2
;
}
[
noncreatable
,
uuid
(
3
f4daca5
-160d-11
d2
-
a8e9
-
00104b365
c9f
)
]
coclass
Match
{
[
default
]
interface
IMatch2
;
}
[
noncreatable
,
uuid
(
3
f4daca6
-160d-11
d2
-
a8e9
-
00104b365
c9f
)
]
coclass
MatchCollection
{
[
default
]
interface
IMatchCollection2
;
}
[
noncreatable
,
uuid
(
3
f4dacc0
-160d-11
d2
-
a8e9
-
00104b365
c9f
)
]
coclass
SubMatches
{
[
default
]
interface
ISubMatches
;
}
}
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