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
666f7501
Commit
666f7501
authored
Oct 29, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 29, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript/tests: Add with statement tests.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e8b2f85b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
98 additions
and
0 deletions
+98
-0
error.vbs
dlls/vbscript/tests/error.vbs
+71
-0
lang.vbs
dlls/vbscript/tests/lang.vbs
+15
-0
run.c
dlls/vbscript/tests/run.c
+12
-0
No files found.
dlls/vbscript/tests/error.vbs
View file @
666f7501
...
...
@@ -77,6 +77,13 @@ const CO_E_SERVER_EXEC_FAILURE = &h80080005&
call
ok
(
Err
.
Number
=
0
,
"Err.Number = "
&
Err
.
Number
)
call
ok
(
getVT
(
Err
.
Number
)
=
"VT_I4"
,
"getVT(Err.Number) = "
&
getVT
(
Err
.
Number
))
class
emptyclass
end
class
class
propclass
public
prop
end
class
dim
calledFunc
sub
returnTrue
...
...
@@ -313,6 +320,70 @@ end sub
call
testForEachError
()
sub
testWithError
()
on
error
resume
next
dim
x
err
.
clear
x
=
false
with
throwInt
(
E_TESTERROR
)
ok
Err
.
Number
=
E_TESTERROR
,
"Err.Number = "
&
Err
.
Number
x
=
true
end
with
ok
x
,
"with statement body not executed"
err
.
clear
x
=
false
with
throwInt
(
E_TESTERROR
)
x
=
true
.
prop
=
1
todo_wine_ok
Err
.
Number
=
424
,
"Err.Number = "
&
Err
.
Number
end
with
ok
x
,
"with statement body not executed"
err
.
clear
x
=
false
with
empty
.
prop
=
1
todo_wine_ok
Err
.
Number
=
424
,
"Err.Number = "
&
Err
.
Number
x
=
true
end
with
ok
x
,
"with statement body not executed"
end
sub
sub
testWithError2
()
on
error
resume
next
dim
x
err
.
clear
x
=
false
with
new
emptyclass
.
prop
=
1
ok
Err
.
Number
=
438
,
"Err.Number = "
&
Err
.
Number
x
=
true
end
with
ok
x
,
"with statement body not executed"
'dot expression can reference only inner-most with statement
err
.
clear
x
=
false
with
new
propclass
with
new
emptyclass
.
prop
=
1
ok
Err
.
Number
=
438
,
"Err.Number = "
&
Err
.
Number
x
=
true
end
with
end
with
ok
x
,
"with statement body not executed"
err
.
clear
.
prop
ok
Err
.
Number
=
505
,
"Err.Number = "
&
Err
.
Number
&
" description
""
"
&
err
.
description
&
"
""
"
end
sub
call
testWithError
()
call
testWithError2
()
sub
testHresMap
(
hres
,
code
)
on
error
resume
next
...
...
dlls/vbscript/tests/lang.vbs
View file @
666f7501
...
...
@@ -1568,4 +1568,19 @@ call ok(x.getProp.prop.prop = 3, "x.getProp.prop.prop = " & x.getProp.prop.prop)
ok
getVT
(
x
)
=
"VT_DISPATCH*"
,
"getVT(x) = "
&
getVT
(
x
)
todo_wine_ok
getVT
(
x
())
=
"VT_BSTR"
,
"getVT(x()) = "
&
getVT
(
x
())
with
nothing
end
with
set
x
=
new
TestPropSyntax
with
x
.
prop
=
1
ok
.
prop
=
1
,
".prop = "
&
.
prop
end
with
ok
x
.
prop
=
1
,
"x.prop = "
&
x
.
prop
with
new
TestPropSyntax
.
prop
=
1
ok
.
prop
=
1
,
".prop = "
&
.
prop
end
with
reportSuccess
()
dlls/vbscript/tests/run.c
View file @
666f7501
...
...
@@ -2920,6 +2920,18 @@ static void run_tests(void)
CHECK_CALLED
(
global_propargput1_d
);
CHECK_CALLED
(
global_propargput1_i
);
SET_EXPECT
(
testobj_propget_d
);
SET_EXPECT
(
testobj_propget_i
);
parse_script_a
(
"dim x
\n
with testObj
\n
x=1+.propget
\n
end with"
);
CHECK_CALLED
(
testobj_propget_d
);
CHECK_CALLED
(
testobj_propget_i
);
SET_EXPECT
(
testobj_propput_d
);
SET_EXPECT
(
testobj_propput_i
);
parse_script_a
(
"with testObj
\n
.propput = 1
\n
end with"
);
CHECK_CALLED
(
testobj_propput_d
);
CHECK_CALLED
(
testobj_propput_i
);
parse_htmlscript_a
(
"<!--"
);
parse_htmlscript_a
(
" -->"
);
parse_htmlscript_a
(
"<!--
\n
dim x
\n
x=1
\n
-->
\n
"
);
...
...
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