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
2a611981
Commit
2a611981
authored
Jan 14, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 14, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript/tests: Use wide char string literals instead of parse_htmlscript_a.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3fc0c965
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
17 deletions
+7
-17
run.c
dlls/jscript/tests/run.c
+7
-17
No files found.
dlls/jscript/tests/run.c
View file @
2a611981
...
...
@@ -1918,7 +1918,7 @@ static HRESULT invoke_procedure(const char *argsa, const char *sourcea, DISPPARA
return
hres
;
}
static
HRESULT
parse_htmlscript
(
BSTR
script_str
)
static
HRESULT
parse_htmlscript
(
const
WCHAR
*
script_str
)
{
IActiveScriptParse
*
parser
;
IActiveScript
*
engine
;
...
...
@@ -2130,16 +2130,6 @@ static void parse_script_ae(const char *src, HRESULT exhres)
ok
(
hres
==
exhres
,
"parse_script failed: %08x, expected %08x
\n
"
,
hres
,
exhres
);
}
static
HRESULT
parse_htmlscript_a
(
const
char
*
src
)
{
HRESULT
hres
;
BSTR
tmp
=
a2bstr
(
src
);
hres
=
parse_htmlscript
(
tmp
);
SysFreeString
(
tmp
);
return
hres
;
}
static
BSTR
get_script_from_file
(
const
char
*
filename
)
{
DWORD
size
,
len
;
...
...
@@ -3085,17 +3075,17 @@ static BOOL run_tests(void)
parse_script_af
(
0
,
"test.testThis2(this);"
);
parse_script_af
(
0
,
"(function () { test.testThis2(this); })();"
);
hres
=
parse_htmlscript
_a
(
"<!--"
);
hres
=
parse_htmlscript
(
L
"<!--"
);
ok
(
hres
==
S_OK
,
"ParseScriptText failed: %08x
\n
"
,
hres
);
hres
=
parse_htmlscript
_a
(
"-->"
);
hres
=
parse_htmlscript
(
L
"-->"
);
ok
(
hres
==
S_OK
,
"ParseScriptText failed: %08x
\n
"
,
hres
);
hres
=
parse_htmlscript
_a
(
"<!--
\n
var a=1;
\n
-->
\n
"
);
hres
=
parse_htmlscript
(
L
"<!--
\n
var a=1;
\n
-->
\n
"
);
ok
(
hres
==
S_OK
,
"ParseScriptText failed: %08x
\n
"
,
hres
);
hres
=
parse_htmlscript
_a
(
"<!--
\n
<!-- ignore this
\n
-->
\n
"
);
hres
=
parse_htmlscript
(
L
"<!--
\n
<!-- ignore this
\n
-->
\n
"
);
ok
(
hres
==
S_OK
,
"ParseScriptText failed: %08x
\n
"
,
hres
);
hres
=
parse_htmlscript
_a
(
"var a=1;
\n
if(a-->0) a=5;
\n
"
);
hres
=
parse_htmlscript
(
L
"var a=1;
\n
if(a-->0) a=5;
\n
"
);
ok
(
hres
==
S_OK
,
"ParseScriptText failed: %08x
\n
"
,
hres
);
hres
=
parse_htmlscript
_a
(
"var a=1;
\n
if(a
\n
-->0) a=5;
\n
"
);
hres
=
parse_htmlscript
(
L
"var a=1;
\n
if(a
\n
-->0) a=5;
\n
"
);
ok
(
hres
!=
S_OK
,
"ParseScriptText have not failed
\n
"
);
test_script_exprs
();
...
...
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