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
de6e9521
Commit
de6e9521
authored
Jul 23, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 23, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Added more tests.
parent
10179c21
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
api.js
dlls/jscript/tests/api.js
+18
-0
No files found.
dlls/jscript/tests/api.js
View file @
de6e9521
...
@@ -198,6 +198,19 @@ tmp = "aA1~`!@#$%^&*()_+=-][{}';:/.,<>?\|";
...
@@ -198,6 +198,19 @@ tmp = "aA1~`!@#$%^&*()_+=-][{}';:/.,<>?\|";
ok
(
escape
(
tmp
)
===
"aA1%7E%60%21@%23%24%25%5E%26*%28%29_+%3D-%5D%5B%7B%7D%27%3B%3A/.%2C%3C%3E%3F%7C"
,
"escape('"
+
tmp
+
"') = "
+
escape
(
tmp
));
ok
(
escape
(
tmp
)
===
"aA1%7E%60%21@%23%24%25%5E%26*%28%29_+%3D-%5D%5B%7B%7D%27%3B%3A/.%2C%3C%3E%3F%7C"
,
"escape('"
+
tmp
+
"') = "
+
escape
(
tmp
));
ok
(
unescape
(
escape
(
tmp
))
===
tmp
,
"unescape(escape('"
+
tmp
+
"')) = "
+
unescape
(
escape
(
tmp
)));
ok
(
unescape
(
escape
(
tmp
))
===
tmp
,
"unescape(escape('"
+
tmp
+
"')) = "
+
unescape
(
escape
(
tmp
)));
ok
(
Object
.
prototype
.
hasOwnProperty
(
'toString'
),
"Object.prototype.hasOwnProperty('toString') is false"
);
ok
(
Object
.
prototype
.
hasOwnProperty
(
'isPrototypeOf'
),
"Object.prototype.hasOwnProperty('isPrototypeOf') is false"
);
ok
(
Function
.
prototype
.
hasOwnProperty
(
'call'
),
"Function.prototype.hasOwnProperty('call') is false"
);
obj
=
new
Object
();
ok
(
!
obj
.
hasOwnProperty
(
'toString'
),
"obj.hasOwnProperty('toString') is true"
);
ok
(
!
obj
.
hasOwnProperty
(
'isPrototypeOf'
),
"obj.hasOwnProperty('isPrototypeOf') is true"
);
ok
(
!
Object
.
hasOwnProperty
(
'toString'
),
"Object.hasOwnProperty('toString') is true"
);
ok
(
!
Object
.
hasOwnProperty
(
'isPrototypeOf'
),
"Object.hasOwnProperty('isPrototypeOf') is true"
);
ok
(
!
parseFloat
.
hasOwnProperty
(
'call'
),
"parseFloat.hasOwnProperty('call') is true"
);
ok
(
!
Function
.
hasOwnProperty
(
'call'
),
"Function.hasOwnProperty('call') is true"
);
tmp
=
""
+
new
Object
();
tmp
=
""
+
new
Object
();
ok
(
tmp
===
"[object Object]"
,
"'' + new Object() = "
+
tmp
);
ok
(
tmp
===
"[object Object]"
,
"'' + new Object() = "
+
tmp
);
(
tmp
=
new
Array
).
f
=
Object
.
prototype
.
toString
;
(
tmp
=
new
Array
).
f
=
Object
.
prototype
.
toString
;
...
@@ -225,6 +238,11 @@ ok(tmp === "[object Object]", "toString.call(arguments) = " + tmp);
...
@@ -225,6 +238,11 @@ ok(tmp === "[object Object]", "toString.call(arguments) = " + tmp);
tmp
=
Object
.
prototype
.
toString
.
call
(
new
VBArray
(
createArray
()));
tmp
=
Object
.
prototype
.
toString
.
call
(
new
VBArray
(
createArray
()));
ok
(
tmp
===
"[object Object]"
,
"toString.call(new VBArray()) = "
+
tmp
);
ok
(
tmp
===
"[object Object]"
,
"toString.call(new VBArray()) = "
+
tmp
);
function
TSTestConstr
()
{}
TSTestConstr
.
prototype
=
{
toString
:
function
()
{
return
"test"
;
}
};
obj
=
new
TSTestConstr
();
ok
(
obj
.
toString
()
===
"test"
,
"obj.toString() = "
+
obj
.
toString
());
ok
(
Object
(
1
)
instanceof
Number
,
"Object(1) is not instance of Number"
);
ok
(
Object
(
1
)
instanceof
Number
,
"Object(1) is not instance of Number"
);
ok
(
Object
(
""
)
instanceof
String
,
"Object('') is not instance of String"
);
ok
(
Object
(
""
)
instanceof
String
,
"Object('') is not instance of String"
);
ok
(
Object
(
false
)
instanceof
Boolean
,
"Object(false) is not instance of Boolean"
);
ok
(
Object
(
false
)
instanceof
Boolean
,
"Object(false) is not instance of Boolean"
);
...
...
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