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
214fab85
Commit
214fab85
authored
Oct 18, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 18, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Added HTML comments tests.
parent
290f5631
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
6 deletions
+34
-6
run.c
dlls/vbscript/tests/run.c
+34
-6
No files found.
dlls/vbscript/tests/run.c
View file @
214fab85
...
...
@@ -1419,7 +1419,7 @@ static void close_script(IActiveScript *script)
ok
(
!
ref
,
"ref=%u
\n
"
,
ref
);
}
static
HRESULT
parse_script
(
DWORD
flags
,
BSTR
script_str
)
static
HRESULT
parse_script
(
DWORD
flags
,
BSTR
script_str
,
const
WCHAR
*
delim
)
{
IActiveScriptParse
*
parser
;
IActiveScript
*
engine
;
...
...
@@ -1446,7 +1446,7 @@ static HRESULT parse_script(DWORD flags, BSTR script_str)
test_counter
=
0
;
hres
=
IActiveScriptParse_ParseScriptText
(
parser
,
script_str
,
NULL
,
NULL
,
NULL
,
0
,
0
,
0
,
NULL
,
NULL
);
hres
=
IActiveScriptParse_ParseScriptText
(
parser
,
script_str
,
NULL
,
NULL
,
delim
,
0
,
0
,
0
,
NULL
,
NULL
);
IActiveScript_Close
(
engine
);
...
...
@@ -1464,7 +1464,7 @@ static void parse_script_af(DWORD flags, const char *src)
HRESULT
hres
;
tmp
=
a2bstr
(
src
);
hres
=
parse_script
(
flags
,
tmp
);
hres
=
parse_script
(
flags
,
tmp
,
NULL
);
SysFreeString
(
tmp
);
ok
(
hres
==
S_OK
,
"parse_script failed: %08x
\n
"
,
hres
);
}
...
...
@@ -1475,7 +1475,7 @@ static HRESULT parse_script_ar(const char *src)
HRESULT
hres
;
tmp
=
a2bstr
(
src
);
hres
=
parse_script
(
SCRIPTITEM_GLOBALMEMBERS
,
tmp
);
hres
=
parse_script
(
SCRIPTITEM_GLOBALMEMBERS
,
tmp
,
NULL
);
SysFreeString
(
tmp
);
return
hres
;
}
...
...
@@ -1485,6 +1485,20 @@ static void parse_script_a(const char *src)
parse_script_af
(
SCRIPTITEM_GLOBALMEMBERS
,
src
);
}
#define parse_htmlscript_a(a) _parse_htmlscript_a(__LINE__,a)
static
void
_parse_htmlscript_a
(
unsigned
line
,
const
char
*
src
)
{
BSTR
tmp
;
HRESULT
hres
;
static
const
WCHAR
script_delimW
[]
=
{
'<'
,
'/'
,
'S'
,
'C'
,
'R'
,
'I'
,
'P'
,
'T'
,
'>'
,
0
};
tmp
=
a2bstr
(
src
);
hres
=
parse_script
(
SCRIPTITEM_GLOBALMEMBERS
,
tmp
,
script_delimW
);
SysFreeString
(
tmp
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"parse_script failed: %08x
\n
"
,
hres
);
}
static
IDispatchEx
*
parse_procedure
(
IActiveScriptParseProcedure2
*
parse_proc
,
const
char
*
src
)
{
IDispatchEx
*
dispex
;
...
...
@@ -1742,7 +1756,7 @@ static void run_from_file(const char *filename)
return
;
strict_dispid_check
=
FALSE
;
hres
=
parse_script
(
SCRIPTITEM_GLOBALMEMBERS
,
script_str
);
hres
=
parse_script
(
SCRIPTITEM_GLOBALMEMBERS
,
script_str
,
NULL
);
SysFreeString
(
script_str
);
ok
(
hres
==
S_OK
,
"parse_script failed: %08x
\n
"
,
hres
);
}
...
...
@@ -1770,7 +1784,7 @@ static void run_from_res(const char *name)
SET_EXPECT
(
global_success_d
);
SET_EXPECT
(
global_success_i
);
hres
=
parse_script
(
SCRIPTITEM_GLOBALMEMBERS
,
str
);
hres
=
parse_script
(
SCRIPTITEM_GLOBALMEMBERS
,
str
,
NULL
);
CHECK_CALLED
(
global_success_d
);
CHECK_CALLED
(
global_success_i
);
...
...
@@ -1859,6 +1873,20 @@ static void run_tests(void)
CHECK_CALLED
(
global_propargput1_d
);
CHECK_CALLED
(
global_propargput1_i
);
parse_htmlscript_a
(
"<!--"
);
parse_htmlscript_a
(
" -->"
);
parse_htmlscript_a
(
"<!--
\n
dim x
\n
x=1
\n
-->
\n
"
);
parse_htmlscript_a
(
"<!--
\n
dim x
\n
-->
\n
<!--
\n
x=1
\n
-->
\n
"
);
hres
=
parse_script_ar
(
"<!--"
);
ok
(
FAILED
(
hres
),
"script didn't fail
\n
"
);
SET_EXPECT
(
global_success_d
);
SET_EXPECT
(
global_success_i
);
parse_htmlscript_a
(
"<!--
\n
<!-- ignore this <> <>
\n
--> <>
\n
Call reportSuccess()
\n
-->
\n
"
);
CHECK_CALLED
(
global_success_d
);
CHECK_CALLED
(
global_success_i
);
next_cnt
=
0
;
SET_EXPECT
(
collectionobj_newenum_i
);
SET_EXPECT
(
Next
);
...
...
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