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
afc63fd5
Commit
afc63fd5
authored
Aug 05, 2016
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 05, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript/tests: Added more tests.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5088828f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
82 additions
and
0 deletions
+82
-0
lang.js
dlls/jscript/tests/lang.js
+82
-0
No files found.
dlls/jscript/tests/lang.js
View file @
afc63fd5
...
...
@@ -269,6 +269,24 @@ testNoRes();
testRes
()
&&
testRes
();
testNoRes
(),
testNoRes
();
(
function
()
{
eval
(
"var x=1;"
);
ok
(
x
===
1
,
"x = "
+
x
);
})();
(
function
()
{
var
e
=
eval
;
var
r
=
e
(
1
);
ok
(
r
===
1
,
"r = "
+
r
);
(
function
(
x
,
a
)
{
x
(
a
);
})(
eval
,
"2"
);
})();
(
function
(
r
)
{
r
=
eval
(
"1"
);
ok
(
r
===
1
,
"r = "
+
r
);
(
function
(
x
,
a
)
{
x
(
a
);
})(
eval
,
"2"
);
})();
tmp
=
(
function
(){
return
testNoRes
(),
testRes
();})();
var
f1
,
f2
;
...
...
@@ -384,6 +402,20 @@ ok(typeof(obj2) === "object", "typeof(obj2) = " + typeof(obj2));
var
obj3
=
new
Object
;
ok
(
typeof
(
obj3
)
===
"object"
,
"typeof(obj3) is not object"
);
(
function
()
{
ok
(
typeof
(
func
)
===
"function"
,
"typeof(func) = "
+
typeof
(
func
));
function
func
()
{}
ok
(
typeof
(
func
)
===
"function"
,
"typeof(func) = "
+
typeof
(
func
));
func
=
0
;
ok
(
typeof
(
func
)
===
"number"
,
"typeof(func) = "
+
typeof
(
func
));
})();
(
function
(
f
)
{
ok
(
typeof
(
f
)
===
"function"
,
"typeof(f) = "
+
typeof
(
f
));
function
f
()
{};
ok
(
typeof
(
f
)
===
"function"
,
"typeof(f) = "
+
typeof
(
f
));
})(
1
);
for
(
var
iter
in
"test"
)
ok
(
false
,
"unexpected forin call, test = "
+
iter
);
...
...
@@ -1286,6 +1318,38 @@ try {
ok
(
false
,
"deleteTest not throwed exception?"
);
}
catch
(
ex
)
{}
(
function
()
{
var
to_delete
=
2
;
var
r
=
delete
to_delete
;
ok
(
r
===
false
,
"delete 1 returned "
+
r
);
if
(
r
)
return
;
ok
(
to_delete
===
2
,
"to_delete = "
+
to_delete
);
to_delete
=
new
Object
();
r
=
delete
to_delete
;
ok
(
r
===
false
,
"delete 2 returned "
+
r
);
ok
(
typeof
(
to_delete
)
===
"object"
,
"typeof(to_delete) = "
+
typeof
(
to_delete
));
})();
(
function
(
to_delete
)
{
var
r
=
delete
to_delete
;
ok
(
r
===
false
,
"delete 3 returned "
+
r
);
ok
(
to_delete
===
2
,
"to_delete = "
+
to_delete
);
to_delete
=
new
Object
();
r
=
delete
to_delete
;
ok
(
r
===
false
,
"delete 4 returned "
+
r
);
ok
(
typeof
(
to_delete
)
===
"object"
,
"typeof(to_delete) = "
+
typeof
(
to_delete
));
})(
2
);
(
function
()
{
with
({
to_delete
:
new
Object
()})
{
var
r
=
delete
to_delete
;
ok
(
r
===
true
,
"delete returned "
+
r
);
}
})();
if
(
false
)
if
(
true
)
ok
(
false
,
"if evaluated"
);
...
...
@@ -1533,6 +1597,24 @@ tmp = (function() {
})();
ok(tmp, "
tmp
=
" + tmp);
(function() {
ok(typeof(func) === "
function
", "
typeof
(
func
)
=
" + typeof(func));
with(new Object()) {
var x = false && function func() {};
}
ok(typeof(func) === "
function
", "
typeof
(
func
)
=
" + typeof(func));
})();
(function() {
ok(x === undefined, "
x
=
" + x); // x is declared, but never initialized
with({x: 1}) {
ok(x === 1, "
x
=
" + x);
var x = 2;
ok(x === 2, "
x
=
" + x);
}
ok(x === undefined, "
x
=
" + x);
})();
/* NoNewline rule parser tests */
while(true) {
if(true) break
...
...
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