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
726f0032
Commit
726f0032
authored
Sep 02, 2011
by
Piotr Caban
Committed by
Alexandre Julliard
Sep 02, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript/tests: Added decodeURI tests.
parent
e4ec169f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
1 deletion
+27
-1
api.js
dlls/jscript/tests/api.js
+27
-1
No files found.
dlls/jscript/tests/api.js
View file @
726f0032
...
...
@@ -101,11 +101,34 @@ tmp = encodeURI("\xffff");
ok
(
tmp
.
length
===
8
,
"encodeURI('
\\
xffff').length = "
+
tmp
.
length
);
tmp
=
encodeURI
(
"abcABC123;/?:@&=+$,-_.!~*'()"
);
ok
(
tmp
===
"abcABC123;/?:@&=+$,-_.!~*'()"
,
"encodeURI('abcABC123;/?:@&=+$,-_.!~*'()') = "
+
tmp
);
tmp
=
encodeURI
(
"%"
);
ok
(
tmp
===
"%25"
,
"encodeURI('%') = "
+
tmp
);
tmp
=
encodeURI
();
ok
(
tmp
===
"undefined"
,
"encodeURI() = "
+
tmp
);
tmp
=
encodeURI
(
"abc"
,
"test"
);
ok
(
tmp
===
"abc"
,
"encodeURI('abc') = "
+
tmp
);
tmp
=
decodeURI
(
"abc"
);
ok
(
tmp
===
"abc"
,
"decodeURI('abc') = "
+
tmp
);
tmp
=
decodeURI
(
"{abc}"
);
ok
(
tmp
===
"{abc}"
,
"decodeURI('{abc}') = "
+
tmp
);
tmp
=
decodeURI
(
""
);
ok
(
tmp
===
""
,
"decodeURI('') = "
+
tmp
);
tmp
=
decodeURI
(
"
\
01
\
02
\
03
\
04"
);
ok
(
tmp
===
"
\
01
\
02
\
03
\
04"
,
"decodeURI('
\\
01
\\
02
\\
03
\\
04') = "
+
tmp
);
tmp
=
decodeURI
();
ok
(
tmp
===
"undefined"
,
"decodeURI() = "
+
tmp
);
tmp
=
decodeURI
(
"abc"
,
"test"
);
ok
(
tmp
===
"abc"
,
"decodeURI('abc') = "
+
tmp
);
tmp
=
decodeURI
(
"%7babc%7d"
);
ok
(
tmp
===
"{abc}"
,
"decodeURI('%7Babc%7D') = "
+
tmp
);
tmp
=
decodeURI
(
"%01%02%03%04"
);
ok
(
tmp
===
"
\
01
\
02
\
03
\
04"
,
"decodeURI('%01%02%03%04') = "
+
tmp
);
tmp
=
decodeURI
(
"%C2%A1%20"
);
ok
(
tmp
===
"
\
xa1 "
,
"decodeURI('%C2%A1%20') = "
+
tmp
);
tmp
=
decodeURI
(
"%C3%BFff"
);
ok
(
tmp
.
length
===
3
,
"decodeURI('%C3%BFff').length = "
+
tmp
.
length
);
tmp
=
encodeURIComponent
(
"abc"
);
ok
(
tmp
===
"abc"
,
"encodeURIComponent('abc') = "
+
tmp
);
dec
=
decodeURIComponent
(
tmp
);
...
...
@@ -1960,7 +1983,8 @@ var exception_array = {
E_REGEXP_SYNTAX_ERROR
:
{
type
:
"RegExpError"
,
number
:
-
2146823271
},
E_URI_INVALID_CHAR
:
{
type
:
"URIError"
,
number
:
-
2146823264
}
E_URI_INVALID_CHAR
:
{
type
:
"URIError"
,
number
:
-
2146823264
},
E_URI_INVALID_CODING
:
{
type
:
"URIError"
,
number
:
-
2146823263
}
};
function
testException
(
func
,
id
)
{
...
...
@@ -2054,6 +2078,8 @@ testException(function() {RegExp(/a/, "g");}, "E_REGEXP_SYNTAX_ERROR");
// URIError tests
testException
(
function
()
{
encodeURI
(
'
\
udcaa'
);},
"E_URI_INVALID_CHAR"
);
testException
(
function
()
{
encodeURIComponent
(
'
\
udcaa'
);},
"E_URI_INVALID_CHAR"
);
testException
(
function
()
{
decodeURI
(
'%'
);},
"E_URI_INVALID_CODING"
);
testException
(
function
()
{
decodeURI
(
'%aaaa'
);},
"E_URI_INVALID_CODING"
);
function
testThisExcept
(
func
,
e
)
{
testException
(
function
()
{
func
.
call
(
new
Object
())},
e
);
...
...
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