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
84baad06
Commit
84baad06
authored
Jun 07, 2010
by
Thomas Mullaly
Committed by
Alexandre Julliard
Jul 21, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon/tests: Added more test data for scheme parsing and canonicalization.
parent
a34700f0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
307 additions
and
0 deletions
+307
-0
uri.c
dlls/urlmon/tests/uri.c
+307
-0
No files found.
dlls/urlmon/tests/uri.c
View file @
84baad06
...
...
@@ -432,6 +432,313 @@ static const uri_properties uri_tests[] = {
{
URL_SCHEME_HTTP
,
S_OK
,
FALSE
},
{
URLZONE_INVALID
,
E_NOTIMPL
,
FALSE
}
}
},
{
"1234://www.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_PATH
|
Uri_HAS_PATH_AND_QUERY
|
Uri_HAS_RAW_URI
|
Uri_HAS_SCHEME_NAME
|
Uri_HAS_HOST_TYPE
|
Uri_HAS_SCHEME
,
TRUE
,
{
{
"1234://www.winehq.org/"
,
S_OK
,
TRUE
},
{
"www.winehq.org"
,
S_OK
,
TRUE
},
{
"1234://www.winehq.org/"
,
S_OK
,
TRUE
},
{
"winehq.org"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"www.winehq.org"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"/"
,
S_OK
,
TRUE
},
{
"/"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"1234://www.winehq.org"
,
S_OK
,
FALSE
},
{
"1234"
,
S_OK
,
FALSE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
}
},
{
{
Uri_HOST_DNS
,
S_OK
,
TRUE
},
{
0
,
S_FALSE
,
TRUE
},
{
URL_SCHEME_UNKNOWN
,
S_OK
,
FALSE
},
{
URLZONE_INVALID
,
E_NOTIMPL
,
FALSE
}
}
},
{
"://www.winehq.org"
,
0
,
E_INVALIDARG
,
FALSE
,
0
,
TRUE
,
{
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
}
},
{
{
Uri_HOST_UNKNOWN
,
S_FALSE
,
TRUE
},
{
0
,
S_FALSE
,
TRUE
},
{
URL_SCHEME_UNKNOWN
,
S_FALSE
,
FALSE
},
{
URLZONE_INVALID
,
E_NOTIMPL
,
FALSE
}
}
},
/* Window's doesn't like URI's which are implicitly file paths without the ALLOW_IMPLICIT_FILE_SCHEME flag set. */
{
"C:/test/test.mp3"
,
0
,
E_INVALIDARG
,
FALSE
,
0
,
TRUE
,
{
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
}
},
{
{
Uri_HOST_UNKNOWN
,
S_FALSE
,
FALSE
},
{
0
,
S_FALSE
,
FALSE
},
{
URL_SCHEME_INVALID
,
S_FALSE
,
FALSE
},
{
URLZONE_INVALID
,
E_NOTIMPL
,
FALSE
}
}
},
/* Window's doesn't like URI's which are implicitly file paths without the ALLOW_IMPLICIT_FILE_SCHEME flag set. */
{
"
\\\\
Server/test/test.mp3"
,
0
,
E_INVALIDARG
,
FALSE
,
0
,
TRUE
,
{
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
}
},
{
{
Uri_HOST_UNKNOWN
,
S_FALSE
,
FALSE
},
{
0
,
S_FALSE
,
FALSE
},
{
URL_SCHEME_INVALID
,
S_FALSE
,
FALSE
},
{
URLZONE_INVALID
,
E_NOTIMPL
,
FALSE
}
}
},
/* Window's doesn't like URI's which are implicitly file paths without the ALLOW_IMPLICIT_FILE_SCHEME flag set. */
{
"
\\\\
Server/test/test.mp3"
,
Uri_CREATE_ALLOW_RELATIVE
,
E_INVALIDARG
,
FALSE
,
0
,
TRUE
,
{
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
}
},
{
{
Uri_HOST_UNKNOWN
,
S_FALSE
,
FALSE
},
{
0
,
S_FALSE
,
FALSE
},
{
URL_SCHEME_INVALID
,
S_FALSE
,
FALSE
},
{
URLZONE_INVALID
,
E_NOTIMPL
,
FALSE
}
}
},
/* Window's doesn't like URI's which are implicitly file paths without the ALLOW_IMPLICIT_FILE_SCHEME flag set. */
{
"C:/test/test.mp3"
,
Uri_CREATE_ALLOW_IMPLICIT_WILDCARD_SCHEME
,
E_INVALIDARG
,
FALSE
,
0
,
TRUE
,
{
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
}
},
{
{
Uri_HOST_UNKNOWN
,
S_FALSE
,
FALSE
},
{
0
,
S_FALSE
,
FALSE
},
{
URL_SCHEME_INVALID
,
S_FALSE
,
FALSE
},
{
URLZONE_INVALID
,
E_NOTIMPL
,
FALSE
}
}
},
/* Test's to make sure the parser/canonicalizer handles implicit file schemes correctly. */
{
"C:/test/test.mp3"
,
Uri_CREATE_ALLOW_IMPLICIT_FILE_SCHEME
,
S_OK
,
FALSE
,
Uri_HAS_ABSOLUTE_URI
|
Uri_HAS_DISPLAY_URI
|
Uri_HAS_EXTENSION
|
Uri_HAS_PATH
|
Uri_HAS_PATH_AND_QUERY
|
Uri_HAS_RAW_URI
|
Uri_HAS_SCHEME_NAME
|
Uri_HAS_HOST_TYPE
|
Uri_HAS_SCHEME
,
TRUE
,
{
{
"file:///C:/test/test.mp3"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"file:///C:/test/test.mp3"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
".mp3"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"/C:/test/test.mp3"
,
S_OK
,
TRUE
},
{
"/C:/test/test.mp3"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"C:/test/test.mp3"
,
S_OK
,
FALSE
},
{
"file"
,
S_OK
,
FALSE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
}
},
{
{
Uri_HOST_UNKNOWN
,
S_OK
,
TRUE
},
{
0
,
S_FALSE
,
TRUE
},
{
URL_SCHEME_FILE
,
S_OK
,
FALSE
},
{
URLZONE_INVALID
,
E_NOTIMPL
,
FALSE
}
}
},
/* Test's to make sure the parser/canonicalizer handles implicit file schemes correctly. */
{
"
\\\\
Server/test.mp3"
,
Uri_CREATE_ALLOW_IMPLICIT_FILE_SCHEME
,
S_OK
,
FALSE
,
Uri_HAS_ABSOLUTE_URI
|
Uri_HAS_AUTHORITY
|
Uri_HAS_DISPLAY_URI
|
Uri_HAS_EXTENSION
|
Uri_HAS_PATH
|
Uri_HAS_PATH_AND_QUERY
|
Uri_HAS_HOST
|
Uri_HAS_RAW_URI
|
Uri_HAS_SCHEME_NAME
|
Uri_HAS_HOST_TYPE
|
Uri_HAS_SCHEME
,
TRUE
,
{
{
"file://server/test.mp3"
,
S_OK
,
TRUE
},
{
"server"
,
S_OK
,
TRUE
},
{
"file://server/test.mp3"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
".mp3"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"server"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"/test.mp3"
,
S_OK
,
TRUE
},
{
"/test.mp3"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"
\\\\
Server/test.mp3"
,
S_OK
,
FALSE
},
{
"file"
,
S_OK
,
FALSE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
}
},
{
{
Uri_HOST_DNS
,
S_OK
,
TRUE
},
{
0
,
S_FALSE
,
TRUE
},
{
URL_SCHEME_FILE
,
S_OK
,
FALSE
},
{
URLZONE_INVALID
,
E_NOTIMPL
,
FALSE
}
}
},
{
"www.winehq.org/test"
,
Uri_CREATE_ALLOW_IMPLICIT_WILDCARD_SCHEME
,
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_HOST_TYPE
|
Uri_HAS_SCHEME
,
TRUE
,
{
{
"*:www.winehq.org/test"
,
S_OK
,
TRUE
},
{
"www.winehq.org"
,
S_OK
,
TRUE
},
{
"*:www.winehq.org/test"
,
S_OK
,
TRUE
},
{
"winehq.org"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"www.winehq.org"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"/test"
,
S_OK
,
TRUE
},
{
"/test"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"www.winehq.org/test"
,
S_OK
,
FALSE
},
{
"*"
,
S_OK
,
FALSE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
}
},
{
{
Uri_HOST_DNS
,
S_OK
,
TRUE
},
{
0
,
S_FALSE
,
TRUE
},
{
URL_SCHEME_WILDCARD
,
S_OK
,
FALSE
},
{
URLZONE_INVALID
,
E_NOTIMPL
,
FALSE
}
}
},
{
"/../some dir/test.ext"
,
Uri_CREATE_ALLOW_RELATIVE
,
S_OK
,
FALSE
,
Uri_HAS_ABSOLUTE_URI
|
Uri_HAS_DISPLAY_URI
|
Uri_HAS_EXTENSION
|
Uri_HAS_PATH
|
Uri_HAS_PATH_AND_QUERY
|
Uri_HAS_RAW_URI
|
Uri_HAS_HOST_TYPE
|
Uri_HAS_SCHEME
,
TRUE
,
{
{
"/../some dir/test.ext"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"/../some dir/test.ext"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
".ext"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"/../some dir/test.ext"
,
S_OK
,
TRUE
},
{
"/../some dir/test.ext"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"/../some dir/test.ext"
,
S_OK
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
}
},
{
{
Uri_HOST_UNKNOWN
,
S_OK
,
TRUE
},
{
0
,
S_FALSE
,
TRUE
},
{
URL_SCHEME_UNKNOWN
,
S_OK
,
FALSE
},
{
URLZONE_INVALID
,
E_NOTIMPL
,
FALSE
}
}
},
{
"//implicit/wildcard/uri scheme"
,
Uri_CREATE_ALLOW_RELATIVE
|
Uri_CREATE_ALLOW_IMPLICIT_WILDCARD_SCHEME
,
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_RAW_URI
|
Uri_HAS_SCHEME_NAME
|
Uri_HAS_HOST_TYPE
|
Uri_HAS_SCHEME
,
TRUE
,
{
{
"*://implicit/wildcard/uri%20scheme"
,
S_OK
,
TRUE
},
{
""
,
S_OK
,
TRUE
},
{
"*://implicit/wildcard/uri%20scheme"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"//implicit/wildcard/uri%20scheme"
,
S_OK
,
TRUE
},
{
"//implicit/wildcard/uri%20scheme"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"//implicit/wildcard/uri scheme"
,
S_OK
,
FALSE
},
{
"*"
,
S_OK
,
FALSE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
},
{
{
Uri_HOST_UNKNOWN
,
S_OK
,
TRUE
},
{
0
,
S_FALSE
,
TRUE
},
{
URL_SCHEME_WILDCARD
,
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