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
520902cb
Commit
520902cb
authored
Jun 17, 2010
by
Thomas Mullaly
Committed by
Alexandre Julliard
Jul 22, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon/tests: Added more test URI's.
parent
eff59a51
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
335 additions
and
0 deletions
+335
-0
uri.c
dlls/urlmon/tests/uri.c
+335
-0
No files found.
dlls/urlmon/tests/uri.c
View file @
520902cb
...
...
@@ -884,6 +884,341 @@ static const uri_properties uri_tests[] = {
{
URL_SCHEME_FTP
,
S_OK
,
FALSE
},
{
URLZONE_INVALID
,
E_NOTIMPL
,
FALSE
}
}
},
/* Make sure % encoded unreserved characters are decoded. */
{
"ftp://w%49%4Ee:PA%53%53@ftp.google.com/"
,
0
,
S_OK
,
FALSE
,
Uri_HAS_ABSOLUTE_URI
|
Uri_HAS_AUTHORITY
|
Uri_HAS_DISPLAY_URI
|
Uri_HAS_DOMAIN
|
Uri_HAS_HOST
|
Uri_HAS_PASSWORD
|
Uri_HAS_PATH
|
Uri_HAS_PATH_AND_QUERY
|
Uri_HAS_RAW_URI
|
Uri_HAS_SCHEME_NAME
|
Uri_HAS_USER_INFO
|
Uri_HAS_USER_NAME
|
Uri_HAS_HOST_TYPE
|
Uri_HAS_PORT
|
Uri_HAS_SCHEME
,
TRUE
,
{
{
"ftp://wINe:PASS@ftp.google.com/"
,
S_OK
,
TRUE
},
{
"wINe:PASS@ftp.google.com"
,
S_OK
,
TRUE
},
{
"ftp://ftp.google.com/"
,
S_OK
,
TRUE
},
{
"google.com"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"ftp.google.com"
,
S_OK
,
TRUE
},
{
"PASS"
,
S_OK
,
TRUE
},
{
"/"
,
S_OK
,
TRUE
},
{
"/"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"ftp://w%49%4Ee:PA%53%53@ftp.google.com/"
,
S_OK
,
FALSE
},
{
"ftp"
,
S_OK
,
FALSE
},
{
"wINe:PASS"
,
S_OK
,
TRUE
},
{
"wINe"
,
S_OK
,
TRUE
}
},
{
{
Uri_HOST_DNS
,
S_OK
,
TRUE
},
{
21
,
S_OK
,
TRUE
},
{
URL_SCHEME_FTP
,
S_OK
,
FALSE
},
{
URLZONE_INVALID
,
E_NOTIMPL
,
FALSE
}
}
},
/* Make sure % encoded characters which are NOT unreserved are NOT decoded. */
{
"ftp://w%5D%5Be:PA%7B%7D@ftp.google.com/"
,
0
,
S_OK
,
FALSE
,
Uri_HAS_ABSOLUTE_URI
|
Uri_HAS_AUTHORITY
|
Uri_HAS_DISPLAY_URI
|
Uri_HAS_DOMAIN
|
Uri_HAS_HOST
|
Uri_HAS_PASSWORD
|
Uri_HAS_PATH
|
Uri_HAS_PATH_AND_QUERY
|
Uri_HAS_RAW_URI
|
Uri_HAS_SCHEME_NAME
|
Uri_HAS_USER_INFO
|
Uri_HAS_USER_NAME
|
Uri_HAS_HOST_TYPE
|
Uri_HAS_PORT
|
Uri_HAS_SCHEME
,
TRUE
,
{
{
"ftp://w%5D%5Be:PA%7B%7D@ftp.google.com/"
,
S_OK
,
TRUE
},
{
"w%5D%5Be:PA%7B%7D@ftp.google.com"
,
S_OK
,
TRUE
},
{
"ftp://ftp.google.com/"
,
S_OK
,
TRUE
},
{
"google.com"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"ftp.google.com"
,
S_OK
,
TRUE
},
{
"PA%7B%7D"
,
S_OK
,
TRUE
},
{
"/"
,
S_OK
,
TRUE
},
{
"/"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"ftp://w%5D%5Be:PA%7B%7D@ftp.google.com/"
,
S_OK
,
FALSE
},
{
"ftp"
,
S_OK
,
FALSE
},
{
"w%5D%5Be:PA%7B%7D"
,
S_OK
,
TRUE
},
{
"w%5D%5Be"
,
S_OK
,
TRUE
}
},
{
{
Uri_HOST_DNS
,
S_OK
,
TRUE
},
{
21
,
S_OK
,
TRUE
},
{
URL_SCHEME_FTP
,
S_OK
,
FALSE
},
{
URLZONE_INVALID
,
E_NOTIMPL
,
FALSE
}
}
},
/* You're allowed to have an empty password portion in the userinfo section. */
{
"ftp://empty:@ftp.google.com/"
,
0
,
S_OK
,
FALSE
,
Uri_HAS_ABSOLUTE_URI
|
Uri_HAS_AUTHORITY
|
Uri_HAS_DISPLAY_URI
|
Uri_HAS_DOMAIN
|
Uri_HAS_HOST
|
Uri_HAS_PASSWORD
|
Uri_HAS_PATH
|
Uri_HAS_PATH_AND_QUERY
|
Uri_HAS_RAW_URI
|
Uri_HAS_SCHEME_NAME
|
Uri_HAS_USER_INFO
|
Uri_HAS_USER_NAME
|
Uri_HAS_HOST_TYPE
|
Uri_HAS_PORT
|
Uri_HAS_SCHEME
,
TRUE
,
{
{
"ftp://empty:@ftp.google.com/"
,
S_OK
,
TRUE
},
{
"empty:@ftp.google.com"
,
S_OK
,
TRUE
},
{
"ftp://ftp.google.com/"
,
S_OK
,
TRUE
},
{
"google.com"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"ftp.google.com"
,
S_OK
,
TRUE
},
{
""
,
S_OK
,
TRUE
},
{
"/"
,
S_OK
,
TRUE
},
{
"/"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"ftp://empty:@ftp.google.com/"
,
S_OK
,
FALSE
},
{
"ftp"
,
S_OK
,
FALSE
},
{
"empty:"
,
S_OK
,
TRUE
},
{
"empty"
,
S_OK
,
TRUE
}
},
{
{
Uri_HOST_DNS
,
S_OK
,
TRUE
},
{
21
,
S_OK
,
TRUE
},
{
URL_SCHEME_FTP
,
S_OK
,
FALSE
},
{
URLZONE_INVALID
,
E_NOTIMPL
,
FALSE
}
}
},
/* Make sure forbidden characters in "userinfo" get encoded. */
{
"ftp://
\"
\"
weird@ftp.google.com/"
,
0
,
S_OK
,
FALSE
,
Uri_HAS_ABSOLUTE_URI
|
Uri_HAS_AUTHORITY
|
Uri_HAS_DISPLAY_URI
|
Uri_HAS_DOMAIN
|
Uri_HAS_HOST
|
Uri_HAS_PATH
|
Uri_HAS_PATH_AND_QUERY
|
Uri_HAS_RAW_URI
|
Uri_HAS_SCHEME_NAME
|
Uri_HAS_USER_INFO
|
Uri_HAS_USER_NAME
|
Uri_HAS_HOST_TYPE
|
Uri_HAS_PORT
|
Uri_HAS_SCHEME
,
TRUE
,
{
{
"ftp://%22%20%22weird@ftp.google.com/"
,
S_OK
,
TRUE
},
{
"%22%20%22weird@ftp.google.com"
,
S_OK
,
TRUE
},
{
"ftp://ftp.google.com/"
,
S_OK
,
TRUE
},
{
"google.com"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"ftp.google.com"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"/"
,
S_OK
,
TRUE
},
{
"/"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"ftp://
\"
\"
weird@ftp.google.com/"
,
S_OK
,
FALSE
},
{
"ftp"
,
S_OK
,
FALSE
},
{
"%22%20%22weird"
,
S_OK
,
TRUE
},
{
"%22%20%22weird"
,
S_OK
,
TRUE
}
},
{
{
Uri_HOST_DNS
,
S_OK
,
TRUE
},
{
21
,
S_OK
,
TRUE
},
{
URL_SCHEME_FTP
,
S_OK
,
FALSE
},
{
URLZONE_INVALID
,
E_NOTIMPL
,
FALSE
}
}
},
/* Make sure the forbidden characters don't get percent encoded. */
{
"ftp://
\"
\"
weird@ftp.google.com/"
,
Uri_CREATE_NO_ENCODE_FORBIDDEN_CHARACTERS
,
S_OK
,
FALSE
,
Uri_HAS_ABSOLUTE_URI
|
Uri_HAS_AUTHORITY
|
Uri_HAS_DISPLAY_URI
|
Uri_HAS_DOMAIN
|
Uri_HAS_HOST
|
Uri_HAS_PATH
|
Uri_HAS_PATH_AND_QUERY
|
Uri_HAS_RAW_URI
|
Uri_HAS_SCHEME_NAME
|
Uri_HAS_USER_INFO
|
Uri_HAS_USER_NAME
|
Uri_HAS_HOST_TYPE
|
Uri_HAS_PORT
|
Uri_HAS_SCHEME
,
TRUE
,
{
{
"ftp://
\"
\"
weird@ftp.google.com/"
,
S_OK
,
TRUE
},
{
"
\"
\"
weird@ftp.google.com"
,
S_OK
,
TRUE
},
{
"ftp://ftp.google.com/"
,
S_OK
,
TRUE
},
{
"google.com"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"ftp.google.com"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"/"
,
S_OK
,
TRUE
},
{
"/"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"ftp://
\"
\"
weird@ftp.google.com/"
,
S_OK
,
FALSE
},
{
"ftp"
,
S_OK
,
FALSE
},
{
"
\"
\"
weird"
,
S_OK
,
TRUE
},
{
"
\"
\"
weird"
,
S_OK
,
TRUE
}
},
{
{
Uri_HOST_DNS
,
S_OK
,
TRUE
},
{
21
,
S_OK
,
TRUE
},
{
URL_SCHEME_FTP
,
S_OK
,
FALSE
},
{
URLZONE_INVALID
,
E_NOTIMPL
,
FALSE
}
}
},
/* Allowed to have invalid % encoded because its an unknown scheme type. */
{
"zip://%xy:word@winehq.org/"
,
0
,
S_OK
,
FALSE
,
Uri_HAS_ABSOLUTE_URI
|
Uri_HAS_AUTHORITY
|
Uri_HAS_DISPLAY_URI
|
Uri_HAS_DOMAIN
|
Uri_HAS_HOST
|
Uri_HAS_PASSWORD
|
Uri_HAS_PATH
|
Uri_HAS_PATH_AND_QUERY
|
Uri_HAS_RAW_URI
|
Uri_HAS_SCHEME_NAME
|
Uri_HAS_USER_INFO
|
Uri_HAS_USER_NAME
|
Uri_HAS_HOST_TYPE
|
Uri_HAS_SCHEME
,
TRUE
,
{
{
"zip://%xy:word@winehq.org/"
,
S_OK
,
TRUE
},
{
"%xy:word@winehq.org"
,
S_OK
,
TRUE
},
{
"zip://%xy:word@winehq.org/"
,
S_OK
,
TRUE
},
{
"winehq.org"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"winehq.org"
,
S_OK
,
TRUE
},
{
"word"
,
S_OK
,
TRUE
},
{
"/"
,
S_OK
,
TRUE
},
{
"/"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"zip://%xy:word@winehq.org/"
,
S_OK
,
FALSE
},
{
"zip"
,
S_OK
,
FALSE
},
{
"%xy:word"
,
S_OK
,
TRUE
},
{
"%xy"
,
S_OK
,
TRUE
}
},
{
{
Uri_HOST_DNS
,
S_OK
,
TRUE
},
{
0
,
S_FALSE
,
TRUE
},
{
URL_SCHEME_UNKNOWN
,
S_OK
,
FALSE
},
{
URLZONE_INVALID
,
E_NOTIMPL
,
FALSE
}
}
},
/* Unreserved, percent encoded characters aren't decoded in the userinfo becuase the scheme
* isn't known.
*/
{
"zip://%2E:%52%53ord@winehq.org/"
,
0
,
S_OK
,
FALSE
,
Uri_HAS_ABSOLUTE_URI
|
Uri_HAS_AUTHORITY
|
Uri_HAS_DISPLAY_URI
|
Uri_HAS_DOMAIN
|
Uri_HAS_HOST
|
Uri_HAS_PASSWORD
|
Uri_HAS_PATH
|
Uri_HAS_PATH_AND_QUERY
|
Uri_HAS_RAW_URI
|
Uri_HAS_SCHEME_NAME
|
Uri_HAS_USER_INFO
|
Uri_HAS_USER_NAME
|
Uri_HAS_HOST_TYPE
|
Uri_HAS_SCHEME
,
TRUE
,
{
{
"zip://%2E:%52%53ord@winehq.org/"
,
S_OK
,
TRUE
},
{
"%2E:%52%53ord@winehq.org"
,
S_OK
,
TRUE
},
{
"zip://%2E:%52%53ord@winehq.org/"
,
S_OK
,
TRUE
},
{
"winehq.org"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"winehq.org"
,
S_OK
,
TRUE
},
{
"%52%53ord"
,
S_OK
,
TRUE
},
{
"/"
,
S_OK
,
TRUE
},
{
"/"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"zip://%2E:%52%53ord@winehq.org/"
,
S_OK
,
FALSE
},
{
"zip"
,
S_OK
,
FALSE
},
{
"%2E:%52%53ord"
,
S_OK
,
TRUE
},
{
"%2E"
,
S_OK
,
TRUE
}
},
{
{
Uri_HOST_DNS
,
S_OK
,
TRUE
},
{
0
,
S_FALSE
,
TRUE
},
{
URL_SCHEME_UNKNOWN
,
S_OK
,
FALSE
},
{
URLZONE_INVALID
,
E_NOTIMPL
,
FALSE
}
}
},
{
"ftp://[](),'test':word@winehq.org/"
,
0
,
S_OK
,
FALSE
,
Uri_HAS_ABSOLUTE_URI
|
Uri_HAS_AUTHORITY
|
Uri_HAS_DISPLAY_URI
|
Uri_HAS_DOMAIN
|
Uri_HAS_HOST
|
Uri_HAS_PASSWORD
|
Uri_HAS_PATH
|
Uri_HAS_PATH_AND_QUERY
|
Uri_HAS_RAW_URI
|
Uri_HAS_SCHEME_NAME
|
Uri_HAS_USER_INFO
|
Uri_HAS_USER_NAME
|
Uri_HAS_HOST_TYPE
|
Uri_HAS_PORT
|
Uri_HAS_SCHEME
,
TRUE
,
{
{
"ftp://[](),'test':word@winehq.org/"
,
S_OK
,
TRUE
},
{
"[](),'test':word@winehq.org"
,
S_OK
,
TRUE
},
{
"ftp://winehq.org/"
,
S_OK
,
TRUE
},
{
"winehq.org"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"winehq.org"
,
S_OK
,
TRUE
},
{
"word"
,
S_OK
,
TRUE
},
{
"/"
,
S_OK
,
TRUE
},
{
"/"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"ftp://[](),'test':word@winehq.org/"
,
S_OK
,
FALSE
},
{
"ftp"
,
S_OK
,
FALSE
},
{
"[](),'test':word"
,
S_OK
,
TRUE
},
{
"[](),'test'"
,
S_OK
,
TRUE
}
},
{
{
Uri_HOST_DNS
,
S_OK
,
TRUE
},
{
21
,
S_OK
,
TRUE
},
{
URL_SCHEME_FTP
,
S_OK
,
FALSE
},
{
URLZONE_INVALID
,
E_NOTIMPL
,
FALSE
}
}
},
{
"ftp://test?:word@winehq.org/"
,
0
,
S_OK
,
FALSE
,
Uri_HAS_ABSOLUTE_URI
|
Uri_HAS_AUTHORITY
|
Uri_HAS_DISPLAY_URI
|
Uri_HAS_HOST
|
Uri_HAS_PATH
|
Uri_HAS_PATH_AND_QUERY
|
Uri_HAS_QUERY
|
Uri_HAS_RAW_URI
|
Uri_HAS_SCHEME_NAME
|
Uri_HAS_HOST_TYPE
|
Uri_HAS_PORT
|
Uri_HAS_SCHEME
,
TRUE
,
{
{
"ftp://test/?:word@winehq.org/"
,
S_OK
,
TRUE
},
{
"test"
,
S_OK
,
TRUE
},
{
"ftp://test/?:word@winehq.org/"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"test"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"/"
,
S_OK
,
TRUE
},
{
"/?:word@winehq.org/"
,
S_OK
,
TRUE
},
{
"?:word@winehq.org/"
,
S_OK
,
TRUE
},
{
"ftp://test?:word@winehq.org/"
,
S_OK
,
FALSE
},
{
"ftp"
,
S_OK
,
FALSE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
}
},
{
{
Uri_HOST_DNS
,
S_OK
,
TRUE
},
{
21
,
S_OK
,
TRUE
},
{
URL_SCHEME_FTP
,
S_OK
,
FALSE
},
{
URLZONE_INVALID
,
E_NOTIMPL
,
FALSE
}
}
},
{
"ftp://test#:word@winehq.org/"
,
0
,
S_OK
,
FALSE
,
Uri_HAS_ABSOLUTE_URI
|
Uri_HAS_AUTHORITY
|
Uri_HAS_DISPLAY_URI
|
Uri_HAS_FRAGMENT
|
Uri_HAS_HOST
|
Uri_HAS_PATH
|
Uri_HAS_PATH_AND_QUERY
|
Uri_HAS_RAW_URI
|
Uri_HAS_SCHEME_NAME
|
Uri_HAS_HOST_TYPE
|
Uri_HAS_PORT
|
Uri_HAS_SCHEME
,
TRUE
,
{
{
"ftp://test/#:word@winehq.org/"
,
S_OK
,
TRUE
},
{
"test"
,
S_OK
,
TRUE
},
{
"ftp://test/#:word@winehq.org/"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"#:word@winehq.org/"
,
S_OK
,
TRUE
},
{
"test"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"/"
,
S_OK
,
TRUE
},
{
"/"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"ftp://test#:word@winehq.org/"
,
S_OK
,
FALSE
},
{
"ftp"
,
S_OK
,
FALSE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
}
},
{
{
Uri_HOST_DNS
,
S_OK
,
TRUE
},
{
21
,
S_OK
,
TRUE
},
{
URL_SCHEME_FTP
,
S_OK
,
FALSE
},
{
URLZONE_INVALID
,
E_NOTIMPL
,
FALSE
}
}
},
/* Allowed to have a backslash in the userinfo since it's an unknown scheme. */
{
"zip://test
\\
:word@winehq.org/"
,
0
,
S_OK
,
FALSE
,
Uri_HAS_ABSOLUTE_URI
|
Uri_HAS_AUTHORITY
|
Uri_HAS_DISPLAY_URI
|
Uri_HAS_DOMAIN
|
Uri_HAS_HOST
|
Uri_HAS_PASSWORD
|
Uri_HAS_PATH
|
Uri_HAS_PATH_AND_QUERY
|
Uri_HAS_RAW_URI
|
Uri_HAS_SCHEME_NAME
|
Uri_HAS_USER_INFO
|
Uri_HAS_USER_NAME
|
Uri_HAS_HOST_TYPE
|
Uri_HAS_SCHEME
,
TRUE
,
{
{
"zip://test
\\
:word@winehq.org/"
,
S_OK
,
TRUE
},
{
"test
\\
:word@winehq.org"
,
S_OK
,
TRUE
},
{
"zip://test
\\
:word@winehq.org/"
,
S_OK
,
TRUE
},
{
"winehq.org"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"winehq.org"
,
S_OK
,
TRUE
},
{
"word"
,
S_OK
,
TRUE
},
{
"/"
,
S_OK
,
TRUE
},
{
"/"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"zip://test
\\
:word@winehq.org/"
,
S_OK
,
FALSE
},
{
"zip"
,
S_OK
,
FALSE
},
{
"test
\\
:word"
,
S_OK
,
TRUE
},
{
"test
\\
"
,
S_OK
,
TRUE
}
},
{
{
Uri_HOST_DNS
,
S_OK
,
TRUE
},
{
0
,
S_FALSE
,
TRUE
},
{
URL_SCHEME_UNKNOWN
,
S_OK
,
FALSE
},
{
URLZONE_INVALID
,
E_NOTIMPL
,
FALSE
}
}
}
};
...
...
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