56static const char*
TEST_URL_1 =
"http://www.winehq.org/tests?date=10/10/1923";
57static const char*
TEST_URL_2 =
"http://localhost:8080/tests%2e.html?date=Mon%2010/10/1923";
58static const char*
TEST_URL_3 =
"http://foo:bar@localhost:21/internal.php?query=x&return=y";
59static const char*
TEST_URL_4 =
"http://foo:bar@google.*.com:21/internal.php?query=x&return=y";
61static const WCHAR winehqW[] = {
'h',
't',
't',
'p',
':',
'/',
'/',
'w',
'w',
'w',
'.',
'w',
'i',
'n',
'e',
'h',
'q',
'.',
'o',
'r',
'g',
'/',0};
62static const CHAR winehqA[] = {
'h',
't',
't',
'p',
':',
'/',
'/',
'w',
'w',
'w',
'.',
'w',
'i',
'n',
'e',
'h',
'q',
'.',
'o',
'r',
'g',
'/',0};
68#define TEST_APPLY_MAX_LENGTH INTERNET_MAX_URL_LENGTH
113 {
"http://www.winehq.org/tests/../tests/../..", 0,
S_OK,
"http://www.winehq.org/",
TRUE},
114 {
"http://www.winehq.org/..", 0,
S_OK,
"http://www.winehq.org/..",
FALSE},
115 {
"http://www.winehq.org/tests/tests2/../../tests", 0,
S_OK,
"http://www.winehq.org/tests",
FALSE},
116 {
"http://www.winehq.org/tests/../tests", 0,
S_OK,
"http://www.winehq.org/tests",
FALSE},
119 {
"http://www.winehq.org/tests\r", 0,
S_OK,
"http://www.winehq.org/tests",
FALSE},
121 {
"http://www.winehq.org/tests/../tests/", 0,
S_OK,
"http://www.winehq.org/tests/",
FALSE},
122 {
"http://www.winehq.org/tests/../tests/..", 0,
S_OK,
"http://www.winehq.org/",
FALSE},
123 {
"http://www.winehq.org/tests/../tests/../", 0,
S_OK,
"http://www.winehq.org/",
FALSE},
124 {
"http://www.winehq.org/tests/..", 0,
S_OK,
"http://www.winehq.org/",
FALSE},
125 {
"http://www.winehq.org/tests/../", 0,
S_OK,
"http://www.winehq.org/",
FALSE},
126 {
"http://www.winehq.org/tests/..?query=x&return=y", 0,
S_OK,
"http://www.winehq.org/?query=x&return=y",
FALSE},
127 {
"http://www.winehq.org/tests/../?query=x&return=y", 0,
S_OK,
"http://www.winehq.org/?query=x&return=y",
FALSE},
128 {
"\tht\ttp\t://www\t.w\tineh\t\tq.or\tg\t/\ttests/..\t?\tquer\ty=x\t\t&re\tturn=y\t\t", 0,
S_OK,
"http://www.winehq.org/?query=x&return=y",
FALSE},
129 {
"http://www.winehq.org/tests/..#example", 0,
S_OK,
"http://www.winehq.org/#example",
FALSE},
130 {
"http://www.winehq.org/tests/../#example", 0,
S_OK,
"http://www.winehq.org/#example",
FALSE},
131 {
"http://www.winehq.org/tests\\../#example", 0,
S_OK,
"http://www.winehq.org/#example",
FALSE},
132 {
"http://www.winehq.org/tests/..\\#example", 0,
S_OK,
"http://www.winehq.org/#example",
FALSE},
133 {
"http://www.winehq.org\\tests/../#example", 0,
S_OK,
"http://www.winehq.org/#example",
FALSE},
136 {
"http://www.winehq.org/tests/foo%20bar",
URL_UNESCAPE ,
S_OK,
"http://www.winehq.org/tests/foo bar",
FALSE},
137 {
"http://www.winehq.org", 0,
S_OK,
"http://www.winehq.org/",
FALSE},
138 {
"http:///www.winehq.org", 0,
S_OK,
"http:///www.winehq.org",
FALSE},
139 {
"http:////www.winehq.org", 0,
S_OK,
"http:////www.winehq.org",
FALSE},
142 {
"file:///c:/tests/foo%20bar", 0,
S_OK,
"file:///c:/tests/foo%20bar",
FALSE},
152 {
"file:///c:\\tests\\foo bar", 0,
S_OK,
"file:///c:/tests/foo bar",
FALSE},
154 {
"file:///c:\\tests\\foobar", 0,
S_OK,
"file:///c:/tests/foobar",
FALSE},
156 {
"file://home/user/file", 0,
S_OK,
"file://home/user/file",
FALSE},
157 {
"file:///home/user/file", 0,
S_OK,
"file:///home/user/file",
FALSE},
158 {
"file:////home/user/file", 0,
S_OK,
"file://home/user/file",
FALSE},
163 {
"file://C:/user/file", 0,
S_OK,
"file:///C:/user/file",
FALSE},
164 {
"file://C:/user/file/../asdf", 0,
S_OK,
"file:///C:/user/asdf",
FALSE},
165 {
"file:///C:/user/file", 0,
S_OK,
"file:///C:/user/file",
FALSE},
166 {
"file:////C:/user/file", 0,
S_OK,
"file:///C:/user/file",
FALSE},
170 {
"http:///www.winehq.org", 0,
S_OK,
"http:///www.winehq.org",
FALSE},
174 {
"c:\\dir\\file", 0,
S_OK,
"file:///c:/dir/file",
FALSE},
175 {
"file:///c:\\dir\\file", 0,
S_OK,
"file:///c:/dir/file",
FALSE},
176 {
"c:dir\\file", 0,
S_OK,
"file:///c:dir/file",
FALSE},
178 {
"c:\\tests\\foo bar", 0,
S_OK,
"file:///c:/tests/foo%20bar",
FALSE},
179 {
"c\t:\t\\te\tsts\\fo\to \tbar\t", 0,
S_OK,
"file:///c:/tests/foo%20bar",
FALSE},
180 {
"res://file", 0,
S_OK,
"res://file/",
FALSE},
184 {
"res:///c:/tests/foo%20bar", 0,
S_OK,
"res:///c:/tests/foo%20bar",
FALSE},
190 {
"res:///c:\\tests\\foo bar", 0,
S_OK,
"res:///c:\\tests\\foo bar",
FALSE},
193 {
"res://c:\\tests/res\\foo%20bar/strange\\sth", 0,
S_OK,
"res://c:\\tests/res\\foo%20bar/strange\\sth",
FALSE},
195 {
"res://c:\\tests/res\\foo%20bar/strange\\sth",
URL_UNESCAPE,
S_OK,
"res://c:\\tests/res\\foo bar/strange\\sth",
FALSE},
196 {
"/A/../B/./C/../../test_remove_dot_segments", 0,
S_OK,
"/test_remove_dot_segments",
FALSE},
199 {
"/A/B\\C/D\\E", 0,
S_OK,
"/A/B\\C/D\\E",
FALSE},
212 {
"A/../B/./../C", 0,
S_OK,
"C",
TRUE},
219 {
"/:test\\", 0,
S_OK,
"/:test\\",
TRUE},
221 {
"http:www.winehq.org/dir/../index.html", 0,
S_OK,
"http:www.winehq.org/index.html"},
225 {
"mk:@MSITStore:C:\\Program Files/AutoCAD 2008\\Help/acad_acg.chm::/WSfacf1429558a55de1a7524c1004e616f8b-322b.htm", 0,
S_OK,
"mk:@MSITStore:C:\\Program Files/AutoCAD 2008\\Help/acad_acg.chm::/WSfacf1429558a55de1a7524c1004e616f8b-322b.htm"},
226 {
"ftp:@MSITStore:C:\\Program Files/AutoCAD 2008\\Help/acad_acg.chm::/WSfacf1429558a55de1a7524c1004e616f8b-322b.htm", 0,
S_OK,
"ftp:@MSITStore:C:\\Program Files/AutoCAD 2008\\Help/acad_acg.chm::/WSfacf1429558a55de1a7524c1004e616f8b-322b.htm"},
227 {
"file:@MSITStore:C:\\Program Files/AutoCAD 2008\\Help/acad_acg.chm::/WSfacf1429558a55de1a7524c1004e616f8b-322b.htm", 0,
S_OK,
"file:@MSITStore:C:/Program Files/AutoCAD 2008/Help/acad_acg.chm::/WSfacf1429558a55de1a7524c1004e616f8b-322b.htm"},
228 {
"http:@MSITStore:C:\\Program Files/AutoCAD 2008\\Help/acad_acg.chm::/WSfacf1429558a55de1a7524c1004e616f8b-322b.htm", 0,
S_OK,
"http:@MSITStore:C:/Program Files/AutoCAD 2008/Help/acad_acg.chm::/WSfacf1429558a55de1a7524c1004e616f8b-322b.htm"},
229 {
"http:@MSITStore:C:\\Program Files/AutoCAD 2008\\Help/acad_acg.chm::/WSfacf1429558a55de1a7524c1004e616f8b-322b.htm",
URL_FILE_USE_PATHURL,
S_OK,
"http:@MSITStore:C:/Program Files/AutoCAD 2008/Help/acad_acg.chm::/WSfacf1429558a55de1a7524c1004e616f8b-322b.htm"},
230 {
"mk:@MSITStore:C:\\Program Files/AutoCAD 2008\\Help/acad_acg.chm::/WSfacf1429558a55de1a7524c1004e616f8b-322b.htm",
URL_FILE_USE_PATHURL,
S_OK,
"mk:@MSITStore:C:\\Program Files/AutoCAD 2008\\Help/acad_acg.chm::/WSfacf1429558a55de1a7524c1004e616f8b-322b.htm"},
244 {
"http://www.winehq.org/tests0", 0, 0,
S_OK,
"http://www.winehq.org/tests0"},
245 {
"http://www.winehq.org/tests1\n", 0, 0,
S_OK,
"http://www.winehq.org/tests1%0A"},
246 {
"http://www.winehq.org/tests2\r", 0, 0,
S_OK,
"http://www.winehq.org/tests2%0D"},
250 {
"/direct/swhelp/series6/6.2i_latestservicepack.dat\r",
URL_ESCAPE_SPACES_ONLY, 0,
S_OK,
"/direct/swhelp/series6/6.2i_latestservicepack.dat\r"},
252 {
"file://////foo/bar\\baz", 0, 0,
S_OK,
"file://foo/bar/baz"},
253 {
"file://///foo/bar\\baz", 0, 0,
S_OK,
"file://foo/bar/baz"},
254 {
"file:////foo/bar\\baz", 0, 0,
S_OK,
"file://foo/bar/baz"},
255 {
"file:///localhost/foo/bar\\baz", 0, 0,
S_OK,
"file:///localhost/foo/bar/baz"},
256 {
"file:///foo/bar\\baz", 0, 0,
S_OK,
"file:///foo/bar/baz"},
257 {
"file://loCalHost/foo/bar\\baz", 0, 0,
S_OK,
"file:///foo/bar/baz"},
258 {
"file://foo/bar\\baz", 0, 0,
S_OK,
"file://foo/bar/baz"},
259 {
"file:/localhost/foo/bar\\baz", 0, 0,
S_OK,
"file:///localhost/foo/bar/baz"},
260 {
"file:/foo/bar\\baz", 0, 0,
S_OK,
"file:///foo/bar/baz"},
261 {
"file:foo/bar\\baz", 0, 0,
S_OK,
"file:foo/bar/baz"},
262 {
"file:\\foo/bar\\baz", 0, 0,
S_OK,
"file:///foo/bar/baz"},
263 {
"file:\\\\foo/bar\\baz", 0, 0,
S_OK,
"file://foo/bar/baz"},
264 {
"file:\\\\\\foo/bar\\baz", 0, 0,
S_OK,
"file:///foo/bar/baz"},
265 {
"file:\\\\localhost\\foo/bar\\baz", 0, 0,
S_OK,
"file:///foo/bar/baz"},
266 {
"file:///f oo/b?a r\\baz", 0, 0,
S_OK,
"file:///f%20oo/b?a r\\baz"},
267 {
"file:///foo/b#a r\\baz", 0, 0,
S_OK,
"file:///foo/b%23a%20r/baz"},
268 {
"file:///f o^&`{}|][\"<>\\%o/b#a r\\baz", 0, 0,
S_OK,
"file:///f%20o%5E%26%60%7B%7D%7C%5D%5B%22%3C%3E/%o/b%23a%20r/baz"},
274 {
"foo/bar\\ba?z\\", 0, 0,
S_OK,
"foo/bar%5Cba?z\\"},
275 {
"/foo/bar\\ba?z\\", 0, 0,
S_OK,
"/foo/bar%5Cba?z\\"},
276 {
"/foo/bar\\ba#z\\", 0, 0,
S_OK,
"/foo/bar%5Cba#z\\"},
277 {
"/foo/%5C", 0, 0,
S_OK,
"/foo/%5C"},
280 {
"http://////foo/bar\\baz", 0, 0,
S_OK,
"http://////foo/bar/baz"},
281 {
"http://///foo/bar\\baz", 0, 0,
S_OK,
"http://///foo/bar/baz"},
282 {
"http:////foo/bar\\baz", 0, 0,
S_OK,
"http:////foo/bar/baz"},
283 {
"http:///foo/bar\\baz", 0, 0,
S_OK,
"http:///foo/bar/baz"},
284 {
"http://localhost/foo/bar\\baz", 0, 0,
S_OK,
"http://localhost/foo/bar/baz"},
285 {
"http://foo/bar\\baz", 0, 0,
S_OK,
"http://foo/bar/baz"},
286 {
"http:/foo/bar\\baz", 0, 0,
S_OK,
"http:/foo/bar/baz"},
287 {
"http:foo/bar\\ba?z\\", 0, 0,
S_OK,
"http:foo%2Fbar%2Fba?z\\"},
288 {
"http:foo/bar\\ba#z\\", 0, 0,
S_OK,
"http:foo%2Fbar%2Fba#z\\"},
289 {
"http:\\foo/bar\\baz", 0, 0,
S_OK,
"http:/foo/bar/baz"},
290 {
"http:\\\\foo/bar\\baz", 0, 0,
S_OK,
"http://foo/bar/baz"},
291 {
"http:\\\\\\foo/bar\\baz", 0, 0,
S_OK,
"http:///foo/bar/baz"},
292 {
"http:\\\\\\\\foo/bar\\baz", 0, 0,
S_OK,
"http:////foo/bar/baz"},
293 {
"http:/fo ?o/b ar\\baz", 0, 0,
S_OK,
"http:/fo%20?o/b ar\\baz"},
294 {
"http:fo ?o/b ar\\baz", 0, 0,
S_OK,
"http:fo%20?o/b ar\\baz"},
297 {
"https://foo/bar\\baz", 0, 0,
S_OK,
"https://foo/bar/baz"},
298 {
"https:/foo/bar\\baz", 0, 0,
S_OK,
"https:/foo/bar/baz"},
299 {
"https:\\foo/bar\\baz", 0, 0,
S_OK,
"https:/foo/bar/baz"},
301 {
"foo:////foo/bar\\baz", 0, 0,
S_OK,
"foo:////foo/bar%5Cbaz"},
302 {
"foo:///foo/bar\\baz", 0, 0,
S_OK,
"foo:///foo/bar%5Cbaz"},
303 {
"foo://localhost/foo/bar\\baz", 0, 0,
S_OK,
"foo://localhost/foo/bar%5Cbaz"},
304 {
"foo://foo/bar\\baz", 0, 0,
S_OK,
"foo://foo/bar%5Cbaz"},
305 {
"foo:/foo/bar\\baz", 0, 0,
S_OK,
"foo:/foo/bar%5Cbaz"},
306 {
"foo:foo/bar\\baz", 0, 0,
S_OK,
"foo:foo%2Fbar%5Cbaz"},
307 {
"foo:\\foo/bar\\baz", 0, 0,
S_OK,
"foo:%5Cfoo%2Fbar%5Cbaz"},
308 {
"foo:/foo/bar\\ba?\\z", 0, 0,
S_OK,
"foo:/foo/bar%5Cba?\\z"},
309 {
"foo:/foo/bar\\ba#\\z", 0, 0,
S_OK,
"foo:/foo/bar%5Cba#\\z"},
311 {
"mailto:/fo/o@b\\%a?\\r.b#\\az", 0, 0,
S_OK,
"mailto:%2Ffo%2Fo@b%5C%a%3F%5Cr.b%23%5Caz"},
312 {
"mailto:fo/o@b\\%a?\\r.b#\\az", 0, 0,
S_OK,
"mailto:fo%2Fo@b%5C%a%3F%5Cr.b%23%5Caz"},
315 {
"ftp:fo/o@bar.baz/foo/bar", 0, 0,
S_OK,
"ftp:fo%2Fo@bar.baz%2Ffoo%2Fbar"},
316 {
"ftp:/fo/o@bar.baz/foo/bar", 0, 0,
S_OK,
"ftp:/fo/o@bar.baz/foo/bar"},
317 {
"ftp://fo/o@bar.baz/fo?o\\bar", 0, 0,
S_OK,
"ftp://fo/o@bar.baz/fo?o\\bar"},
318 {
"ftp://fo/o@bar.baz/fo#o\\bar", 0, 0,
S_OK,
"ftp://fo/o@bar.baz/fo#o\\bar"},
319 {
"ftp://localhost/o@bar.baz/fo#o\\bar", 0, 0,
S_OK,
"ftp://localhost/o@bar.baz/fo#o\\bar"},
320 {
"ftp:///fo/o@bar.baz/foo/bar", 0, 0,
S_OK,
"ftp:///fo/o@bar.baz/foo/bar"},
321 {
"ftp:////fo/o@bar.baz/foo/bar", 0, 0,
S_OK,
"ftp:////fo/o@bar.baz/foo/bar"},
323 {
"ftp\x1f\1end/", 0, 0,
S_OK,
"ftp%1F%01end/"}
336 {{
' ',
'<',
'>',
'"',0},
URL_ESCAPE_AS_UTF8,
S_OK, {
'%',
'2',
'0',
'%',
'3',
'C',
'%',
'3',
'E',
'%',
'2',
'2',0}},
337 {{
'{',
'}',
'|',
'\\',0},
URL_ESCAPE_AS_UTF8,
S_OK, {
'%',
'7',
'B',
'%',
'7',
'D',
'%',
'7',
'C',
'%',
'5',
'C',0}},
338 {{
'^',
']',
'[',
'`',0},
URL_ESCAPE_AS_UTF8,
S_OK, {
'%',
'5',
'E',
'%',
'5',
'D',
'%',
'5',
'B',
'%',
'6',
'0',0}},
339 {{
'&',
'/',
'?',
'#',0},
URL_ESCAPE_AS_UTF8,
S_OK, {
'%',
'2',
'6',
'/',
'?',
'#',0}},
340 {{
'M',
'a',
's',
's',0},
URL_ESCAPE_AS_UTF8,
S_OK, {
'M',
'a',
's',
's',0}},
344 {{
'M',
'a',0xdf,0},
URL_ESCAPE_AS_UTF8,
S_OK, {
'M',
'a',
'%',
'C',
'3',
'%',
'9',
'F',0},
345 {
'M',
'a',
'%',
'D',
'F',0}},
347 {{0xd841,0xdf0e,0},
URL_ESCAPE_AS_UTF8,
S_OK, {
'%',
'F',
'0',
'%',
'A',
'0',
'%',
'9',
'C',
'%',
'8',
'E',0},
348 {
'%',
'E',
'F',
'%',
'B',
'F',
'%',
'B',
'D',
'%',
'E',
'F',
'%',
'B',
'F',
'%',
'B',
'D',0},
351 {{0xd85e,0xde3e,0},
URL_ESCAPE_AS_UTF8,
S_OK, {
'%',
'F',
'0',
'%',
'A',
'7',
'%',
'A',
'8',
'%',
'B',
'E',0},
352 {
'%',
'E',
'F',
'%',
'B',
'F',
'%',
'B',
'D',
'%',
'E',
'F',
'%',
'B',
'F',
'%',
'B',
'D',0},
355 {{0xd85e,0},
URL_ESCAPE_AS_UTF8,
S_OK, {
'%',
'E',
'F',
'%',
'B',
'F',
'%',
'B',
'D',0},
357 {{0xd85e,0x41},
URL_ESCAPE_AS_UTF8,
S_OK, {
'%',
'E',
'F',
'%',
'B',
'F',
'%',
'B',
'D',
'A',0},
359 {{0xdc00,0},
URL_ESCAPE_AS_UTF8,
S_OK, {
'%',
'E',
'F',
'%',
'B',
'F',
'%',
'B',
'D',0},
361 {{0xffff,0},
URL_ESCAPE_AS_UTF8,
S_OK, {
'%',
'E',
'F',
'%',
'B',
'F',
'%',
'B',
'F',0},
377 {
"http://www.winehq.org/tests",
"tests1", 0,
S_OK,
"http://www.winehq.org/tests1"},
378 {
"http://www.%77inehq.org/tests",
"tests1", 0,
S_OK,
"http://www.%77inehq.org/tests1"},
380 {
"http://www.winehq.org/tests/",
"../tests3", 0,
S_OK,
"http://www.winehq.org/tests3"},
381 {
"http://www.winehq.org/tests/test1",
"test2", 0,
S_OK,
"http://www.winehq.org/tests/test2"},
382 {
"http://www.winehq.org/tests/../tests",
"tests4", 0,
S_OK,
"http://www.winehq.org/tests4"},
383 {
"http://www.winehq.org/tests/../tests/",
"tests5", 0,
S_OK,
"http://www.winehq.org/tests/tests5"},
384 {
"http://www.winehq.org/tests/../tests/",
"/tests6/..", 0,
S_OK,
"http://www.winehq.org/"},
385 {
"http://www.winehq.org/tests/../tests/..",
"tests7/..", 0,
S_OK,
"http://www.winehq.org/"},
386 {
"http://www.winehq.org/tests/?query=x&return=y",
"tests8", 0,
S_OK,
"http://www.winehq.org/tests/tests8"},
387 {
"http://www.winehq.org/tests/#example",
"tests9", 0,
S_OK,
"http://www.winehq.org/tests/tests9"},
388 {
"http://www.winehq.org/tests/../tests/",
"/tests10/..",
URL_DONT_SIMPLIFY,
S_OK,
"http://www.winehq.org/tests10/.."},
389 {
"http://www.winehq.org/tests/../",
"tests11",
URL_DONT_SIMPLIFY,
S_OK,
"http://www.winehq.org/tests/../tests11"},
390 {
"http://www.winehq.org/test12",
"#", 0,
S_OK,
"http://www.winehq.org/test12#"},
391 {
"http://www.winehq.org/test13#aaa",
"#bbb", 0,
S_OK,
"http://www.winehq.org/test13#bbb"},
392 {
"http://www.winehq.org/test14#aaa/bbb#ccc",
"#", 0,
S_OK,
"http://www.winehq.org/test14#"},
393 {
"http://www.winehq.org/tests/?query=x/y/z",
"tests15", 0,
S_OK,
"http://www.winehq.org/tests/tests15"},
394 {
"http://www.winehq.org/tests/?query=x/y/z#example",
"tests16", 0,
S_OK,
"http://www.winehq.org/tests/tests16"},
395 {
"http://www.winehq.org/tests17",
".", 0,
S_OK,
"http://www.winehq.org/"},
396 {
"http://www.winehq.org/tests18/test",
".", 0,
S_OK,
"http://www.winehq.org/tests18/"},
397 {
"http://www.winehq.org/tests19/test",
"./", 0,
S_OK,
"http://www.winehq.org/tests19/",
FALSE},
398 {
"http://www.winehq.org/tests20/test",
"/", 0,
S_OK,
"http://www.winehq.org/",
FALSE},
399 {
"http://www.winehq.org/tests/test",
"./test21", 0,
S_OK,
"http://www.winehq.org/tests/test21",
FALSE},
400 {
"http://www.winehq.org/tests/test",
"./test22/../test", 0,
S_OK,
"http://www.winehq.org/tests/test",
FALSE},
401 {
"http://www.winehq.org/tests/",
"http://www.winehq.org:80/tests23", 0,
S_OK,
"http://www.winehq.org/tests23",
TRUE},
402 {
"http://www.winehq.org/tests/",
"tests24/./test/../test", 0,
S_OK,
"http://www.winehq.org/tests/tests24/test",
FALSE},
403 {
"http://www.winehq.org/tests/./tests25",
"./", 0,
S_OK,
"http://www.winehq.org/tests/",
FALSE},
404 {
"file:///C:\\dir\\file.txt",
"test.txt", 0,
S_OK,
"file:///C:/dir/test.txt"},
405 {
"file:///C:\\dir\\file.txt#hash\\hash",
"test.txt", 0,
S_OK,
"file:///C:/dir/file.txt#hash/test.txt"},
406 {
"file:///C:\\dir\\file.html#hash\\hash",
"test.html", 0,
S_OK,
"file:///C:/dir/test.html"},
407 {
"file:///C:\\dir\\file.htm#hash\\hash",
"test.htm", 0,
S_OK,
"file:///C:/dir/test.htm"},
408 {
"file:///C:\\dir\\file.hTmL#hash\\hash",
"test.hTmL", 0,
S_OK,
"file:///C:/dir/test.hTmL"},
409 {
"file:///C:\\dir.html\\file.txt#hash\\hash",
"test.txt", 0,
S_OK,
"file:///C:/dir.html/file.txt#hash/test.txt"},
410 {
"C:\\winehq\\winehq.txt",
"C:\\Test\\test.txt", 0,
S_OK,
"file:///C:/Test/test.txt"},
411 {
"http://www.winehq.org/test/",
"test%20file.txt", 0,
S_OK,
"http://www.winehq.org/test/test%20file.txt"},
412 {
"http://www.winehq.org/test/",
"test%20file.txt",
URL_FILE_USE_PATHURL,
S_OK,
"http://www.winehq.org/test/test%20file.txt"},
413 {
"http://www.winehq.org%2ftest/",
"test%20file.txt",
URL_FILE_USE_PATHURL,
S_OK,
"http://www.winehq.org%2ftest/test%20file.txt"},
414 {
"xxx:@MSITStore:file.chm/file.html",
"dir/file", 0,
S_OK,
"xxx:dir/file"},
415 {
"mk:@MSITStore:file.chm::/file.html",
"/dir/file", 0,
S_OK,
"mk:@MSITStore:file.chm::/dir/file"},
416 {
"mk:@MSITStore:file.chm::/file.html",
"mk:@MSITStore:file.chm::/dir/file", 0,
S_OK,
"mk:@MSITStore:file.chm::/dir/file"},
417 {
"foo:today",
"foo:calendar", 0,
S_OK,
"foo:calendar"},
418 {
"foo:today",
"bar:calendar", 0,
S_OK,
"bar:calendar"},
419 {
"foo:/today",
"foo:calendar", 0,
S_OK,
"foo:/calendar"},
420 {
"Foo:/today/",
"fOo:calendar", 0,
S_OK,
"foo:/today/calendar"},
421 {
"mk:@MSITStore:dir/test.chm::dir/index.html",
"image.jpg", 0,
S_OK,
"mk:@MSITStore:dir/test.chm::dir/image.jpg"},
422 {
"mk:@MSITStore:dir/test.chm::dir/dir2/index.html",
"../image.jpg", 0,
S_OK,
"mk:@MSITStore:dir/test.chm::dir/image.jpg"},
424 {
"outbind://xxxxxxxxx",
"http://wine1/dir",0,
S_OK,
"http://wine1/dir"},
425 {
"xxxx://xxxxxxxxx",
"http://wine2/dir",0,
S_OK,
"http://wine2/dir"},
426 {
"ftp://xxxxxxxxx/",
"http://wine3/dir",0,
S_OK,
"http://wine3/dir"},
430 {
"http://xxxxxxxxx",
"outbind://wine7/dir",0,
S_OK,
"outbind://wine7/dir"},
431 {
"xxx://xxxxxxxxx",
"ftp://wine8/dir",0,
S_OK,
"ftp://wine8/dir"},
432 {
"ftp://xxxxxxxxx/",
"xxx://wine9/dir",0,
S_OK,
"xxx://wine9/dir"},
436 {
"http://xxxxxxxxx",
"outbind:wine13/dir",0,
S_OK,
"outbind:wine13/dir"},
437 {
"xxx://xxxxxxxxx",
"ftp:wine14/dir",0,
S_OK,
"ftp:wine14/dir"},
438 {
"ftp://xxxxxxxxx/",
"xxx:wine15/dir",0,
S_OK,
"xxx:wine15/dir"},
439 {
"outbind://xxxxxxxxx/",
"http:wine16/dir",0,
S_OK,
"http:wine16/dir"},
454 {
"foo",
"file:foo",
S_OK},
455 {
"foo\\bar",
"file:foo/bar",
S_OK},
456 {
"\\foo\\bar",
"file:///foo/bar",
S_OK},
457 {
"c:\\foo\\bar",
"file:///c:/foo/bar",
S_OK},
458 {
"c:foo\\bar",
"file:///c:foo/bar",
S_OK},
459 {
"c:\\foo/b a%r",
"file:///c:/foo/b%20a%25r",
S_OK},
460 {
"c:\\foo\\foo bar",
"file:///c:/foo/foo%20bar",
S_OK},
461 {
"file:///c:/foo/bar",
"file:///c:/foo/bar",
S_FALSE},
466 {
"xx:c:\\foo\\bar",
"xx:c:\\foo\\bar",
S_FALSE}
476 {
"file://foo/bar",
"file://foo/bar"},
477 {
"file://fo%20o%5Ca/bar",
"file://fo o\\a/bar"},
478 {
"file://%24%25foobar",
"file://$%foobar"}
487 {
"http://foo/bar",
TRUE},
488 {
"c:\\foo\\bar",
FALSE},
489 {
"foo://foo/bar",
TRUE},
492 {
"bogusscheme:",
TRUE},
493 {
"http:partial",
TRUE}
526 {
"mailto://www.winehq.org/test.html",
TRUE,
FALSE },
559 if (!pUrlApplySchemeA) {
560 win_skip(
"UrlApplySchemeA not found\n");
603 ok(
len ==
i,
"got len %d (expected %d)\n",
len,
i);
635 DWORD dwHash1, dwHash2;
636 res = pUrlHashA(szTestUrl, (
LPBYTE)&dwHash1, cbSize);
637 ok(
res ==
S_OK,
"UrlHashA returned 0x%x (expected S_OK) for %s\n",
res, szUrl);
639 res = pUrlHashW(wszTestUrl, (
LPBYTE)&dwHash2, cbSize);
640 ok(
res ==
S_OK,
"UrlHashW returned 0x%x (expected S_OK) for %s\n",
res, szUrl);
641 ok(dwHash1 == dwHash2,
642 "Hashes didn't match (A: 0x%x, W: 0x%x) for %s\n", dwHash1, dwHash2, szUrl);
676 "UrlGetPart for \"%s\" gave size: %u\n", szUrl,
dwSize);
681 "UrlGetPartA for \"%s\" part 0x%08x returned 0x%x and \"%s\"\n",
682 szUrl, dwPart,
res, szPart);
687 "UrlGetPartW for \"%s\" part 0x%08x returned 0x%x\n",
693 "Strings didn't match between ascii and unicode UrlGetPart!\n");
701 (*szExpected==
'?' && !
strcmp(szPart,szExpected+1)),
702 "Expected %s, but got %s\n", szExpected, szPart);
709 const char*
file_url =
"file://h o s t/c:/windows/file";
710 const char*
http_url =
"http://user:pass 123@www.wine hq.org";
711 const char* res_url =
"res://some.dll/find.dlg";
712 const char* about_url =
"about:blank";
713 const char* excid_url =
"x-excid://36C00000/guid:{048B4E89-2E92-496F-A837-33BA02FF6D32}/Message.htm";
714 const char* foo_url =
"foo://bar-url/test";
715 const char* short_url =
"ascheme:";
722 win_skip(
"UrlGetPartA not found\n");
739 szPart[0]=
'x'; szPart[1]=0;
742 ok(szPart[0] ==
'x' && szPart[1] == 0,
"UrlGetPartA(*pcchOut = 0) modified szPart: \"%s\"\n", szPart);
746 szPart[0]=
'x'; szPart[1]=0;
749 ok(szPart[0]==0,
"UrlGetPartA(\"hi\") return \"%s\" instead of \"\"\n", szPart);
754 const WCHAR hiW[] = {
'h',
'i',0};
759 bufW[0]=
'x'; bufW[1]=0;
762 ok(bufW[0] == 0,
"UrlGetPartW(\"hi\") return \"%c\"\n", bufW[0]);
767 szPart[0]=
'x'; szPart[1]=0;
770 ok(szPart[0]==0,
"UrlGetPartA(\"hi\") return \"%s\" instead of \"\"\n", szPart);
801 szPart[0]=
'x'; szPart[1]=0;
804 ok(szPart[0]==0,
"UrlGetPartA gave \"%s\" instead of \"\"\n", szPart);
813 szPart[0] =
'x'; szPart[1] =
'\0';
816 ok(szPart[0] ==
'\0',
"szPart[0] = %c\n", szPart[0]);
820 szPart[0] =
'x'; szPart[1] =
'\0';
825 szPart[0] =
'x'; szPart[1] =
'\0';
828 ok(szPart[0] ==
'x',
"szPart[0] = %c\n", szPart[0]);
832 szPart[0] =
'x'; szPart[1] =
'\0';
835 ok(szPart[0] == 0,
"szPart[0] = %c\n", szPart[0]);
839 szPart[0] =
'x'; szPart[1] =
'\0';
842 ok(szPart[0] ==
'x',
"szPart[0] = %c\n", szPart[0]);
846 szPart[0] =
'x'; szPart[1] =
'\0';
849 ok(szPart[0] == 0,
"szPart[0] = %c\n", szPart[0]);
867 ok(
ret != dwExpectReturn,
"got 0s%x: Unexpected return for NULL buffer, index %d\n",
ret,
index);
869 ok(
ret == dwExpectReturn ||
ret == dwExpectReturnAlt,
870 "UrlCanonicalizeA failed: expected=0x%08x or 0x%08x, got=0x%08x, index %d\n",
871 dwExpectReturn, dwExpectReturnAlt,
ret,
index);
873 ok(
strcmp(szReturnUrl,szExpectUrl)==0,
"UrlCanonicalizeA dwFlags 0x%08x url '%s' Expected \"%s\", but got \"%s\", index %d\n",
dwFlags, szUrl, szExpectUrl, szReturnUrl,
index);
875 if (pUrlCanonicalizeW) {
878 ok(
ret != dwExpectReturn,
"got 0x%x: Unexpected return for NULL buffer, index %d\n",
ret,
index);
880 ok(
ret == dwExpectReturn,
"UrlCanonicalizeW failed: expected 0x%08x, got 0x%x, index %d\n",
884 ok(
lstrcmpW(wszReturnUrl, wszConvertedUrl)==0,
885 "Strings didn't match between ascii and unicode UrlCanonicalize, index %d!\n",
index);
899 char empty_string[] =
"";
908 ok(
size == 0,
"got %d, expected %d\n",
size, 0);
913 ok(
size == 0,
"got %d, expected %d\n",
size, 0);
918 ok(
size == 1,
"got %d, expected %d\n",
size, 1);
923 ok(
size == 1,
"got %d, expected %d\n",
size, 1);
926 empty_string[0] = 127;
929 ok(
size == 34,
"got %d, expected %d\n",
size, 34);
930 ok(empty_string[0] == 127,
"String has changed, empty_string[0] = %d\n", empty_string[0]);
933 empty_string[0] = 127;
938 "got %d, expected %d\n",
size, 1);
939 ok(empty_string[0] == 127,
"String has changed, empty_string[0] = %d\n", empty_string[0]);
946 ok(
ret ==
TEST_ESCAPE[
i].expectret,
"UrlEscapeA returned 0x%08x instead of 0x%08x for \"%s\"\n",
955 static const WCHAR path_test[] = {
'/',
't',
'e',
's',
't',0};
956 static const WCHAR naW[] = {
'f',
't',
'p',31,255,250,0x2122,
'e',
'n',
'd',
'/',0};
957 static const WCHAR naescapedW[] = {
'f',
't',
'p',
'%',
'1',
'F',
'%',
'F',
'F',
'%',
'F',
'A',0x2122,
'e',
'n',
'd',
'/',0};
958 static const WCHAR out[] = {
'f',
'o',
'o',
'%',
'2',
'0',
'b',
'a',
'r',0};
959 WCHAR overwrite[] = {
'f',
'o',
'o',
' ',
'b',
'a',
'r',0,0,0};
961 WCHAR empty_string[] = {0};
980 ok(
size == 0,
"got %d, expected %d\n",
size, 0);
988 ok(
size == 0,
"got %d, expected %d\n",
size, 0);
996 ok(
size == 1,
"got %d, expected %d\n",
size, 1);
1004 ok(
size == 6,
"got %d, expected %d\n",
size, 6);
1018 ok(
size == 10,
"got %d, expected 10\n",
size);
1019 ok(wc == 127,
"String has changed, wc = %d\n", wc);
1023 ret = pUrlEscapeW(naW, ret_urlW, &
size, 0);
1029 WCHAR *urlW, *expected_urlW;
1035 ok(
ret ==
TEST_ESCAPE[
i].expectret,
"UrlEscapeW returned 0x%08x instead of 0x%08x for %s\n",
1037 ok(!
lstrcmpW(ret_urlW, expected_urlW),
"Expected %s, but got %s for %s flags %08x\n",
1048 ok(
ret ==
TEST_ESCAPEW[
i].expectret,
"UrlEscapeW returned 0x%08x instead of 0x%08x for \"%s\"\n",
1053 "Expected \"%s\" or \"%s\" or \"%s\", but got \"%s\" for \"%s\"\n",
1070 if (!pUrlCanonicalizeA) {
1071 win_skip(
"UrlCanonicalizeA not found\n");
1079 memset(szReturnUrl,
'#', urllen+4);
1080 szReturnUrl[urllen+4] =
'\0';
1084 "got 0x%x with %u and size %u for '%s' and %u (expected 'E_POINTER' and size %u)\n",
1089 memset(szReturnUrl,
'#', urllen+4);
1090 szReturnUrl[urllen+4] =
'\0';
1094 "got 0x%x with %u and size %u for '%s' and %u (expected 'E_POINTER' and size %u)\n",
1099 memset(szReturnUrl,
'#', urllen+4);
1100 szReturnUrl[urllen+4] =
'\0';
1104 "got 0x%x with %u and size %u for '%s' and %u (expected 'S_OK' and size %u)\n",
1109 memset(szReturnUrl,
'#', urllen+4);
1110 szReturnUrl[urllen+4] =
'\0';
1114 "got 0x%x with %u and size %u for '%s' and %u (expected 'S_OK' and size %u)\n",
1119 memset(szReturnUrl,
'#', urllen+4);
1120 szReturnUrl[urllen+4] =
'\0';
1124 "got 0x%x with %u and size %u for '%s' and %u (expected 'E_INVALIDARG' and size %u)\n",
1128 dwSize=
sizeof(szReturnUrl);
1129 memset(longurl,
'a',
sizeof(longurl));
1131 longurl[
sizeof(longurl)-1] =
'\0';
1156 if (!pUrlCanonicalizeW) {
1157 win_skip(
"UrlCanonicalizeW not found\n");
1164 memset(szReturnUrl,
'#', (urllen+4) *
sizeof(
WCHAR));
1165 szReturnUrl[urllen+4] =
'\0';
1169 "got 0x%x with %u and size %u for %u (expected 'E_POINTER' and size %u)\n",
1175 memset(szReturnUrl,
'#', (urllen+4) *
sizeof(
WCHAR));
1176 szReturnUrl[urllen+4] =
'\0';
1180 "got 0x%x with %u and size %u for %u (expected 'E_POINTER' and size %u)\n",
1185 memset(szReturnUrl,
'#', (urllen+4) *
sizeof(
WCHAR));
1186 szReturnUrl[urllen+4] =
'\0';
1190 "got 0x%x with %u and size %u for %u (expected 'S_OK' and size %u)\n",
1195 memset(szReturnUrl,
'#', (urllen+4) *
sizeof(
WCHAR));
1196 szReturnUrl[urllen+4] =
'\0';
1200 "got 0x%x with %u and size %u for %u (expected 'S_OK' and size %u)\n",
1204 for (
i = 1;
i < 65536;
i++)
1214 pUrlCanonicalizeW(szUrl, szReturnUrl, &urllen, 0);
1216 ok(choped == (
i <= 32),
"Incorrect char chopping for char %d\n",
i);
1227 LPWSTR wszUrl1, wszUrl2, wszExpectUrl, wszConvertedUrl;
1232 if (!pUrlCombineA) {
1233 win_skip(
"UrlCombineA not found\n");
1247 ok(
todo ||
dwSize == dwExpectLen+1,
"Got length %d, expected %d\n",
dwSize, dwExpectLen+1);
1252 ok(
todo ||
dwSize == dwExpectLen+1,
"Got length %d, expected %d\n",
dwSize, dwExpectLen+1);
1255 ok(
hr == dwExpectReturn,
"UrlCombineA returned 0x%08x, expected 0x%08x\n",
hr, dwExpectReturn);
1260 "Expected %s (len=%d), but got %s (len=%d)\n", szExpectUrl, dwExpectLen,
SUCCEEDED(
hr) ? szReturnUrl :
"(null)",
dwSize);
1264 ok(
dwSize == dwExpectLen,
"Got length %d, expected %d\n",
dwSize, dwExpectLen);
1266 ok(
strcmp(szReturnUrl, szExpectUrl)==0,
"Expected %s, but got %s\n", szExpectUrl, szReturnUrl);
1273 ok(
todo ||
dwSize == dwExpectLen+1,
"Got length %d, expected %d\n",
dwSize, dwExpectLen+1);
1278 ok(
todo ||
dwSize == dwExpectLen+1,
"Got length %d, expected %d\n",
dwSize, dwExpectLen+1);
1281 ok(
hr == dwExpectReturn,
"UrlCombineW returned 0x%08x, expected 0x%08x\n",
hr, dwExpectReturn);
1282 ok(
todo ||
dwSize == dwExpectLen,
"Got length %d, expected %d\n",
dwSize, dwExpectLen);
1285 ok(
lstrcmpW(wszReturnUrl, wszConvertedUrl)==0,
"Strings didn't match between ascii and unicode UrlCombine!\n");
1314 WCHAR *pathW, *urlW;
1316 if (!pUrlCreateFromPathA) {
1317 win_skip(
"UrlCreateFromPathA not found\n");
1328 if (pUrlCreateFromPathW) {
1332 ret = pUrlCreateFromPathW(pathW, ret_urlW, &
len, 0);
1336 ok(!
lstrcmpiW(ret_urlW, urlW),
"got %s expected %s from path L\"%s\"\n",
1386 "returned %d from path (UrlIsW) %s, expected %d\n",
ret,
1405 "returned %d for URLIS_OPAQUE (UrlIsW), url \"%s\", expected %d\n",
1409 "returned %d for URLIS_FILEURL (UrlIsW), url \"%s\", expected %d\n",
1421 WCHAR *urlW, *expected_urlW;
1424 static char inplace[] =
"file:///C:/Program%20Files";
1425 static char another_inplace[] =
"file:///C:/Program%20Files";
1426 static const char expected[] =
"file:///C:/Program Files";
1427 static WCHAR inplaceW[] = {
'f',
'i',
'l',
'e',
':',
'/',
'/',
'/',
'C',
':',
'/',
'P',
'r',
'o',
'g',
'r',
'a',
'm',
' ',
'F',
'i',
'l',
'e',
's',0};
1428 static WCHAR another_inplaceW[] ={
'f',
'i',
'l',
'e',
':',
'/',
'/',
'/',
1429 'C',
':',
'/',
'P',
'r',
'o',
'g',
'r',
'a',
'm',
'%',
'2',
'0',
'F',
'i',
'l',
'e',
's',0};
1432 if (!pUrlUnescapeA) {
1433 win_skip(
"UrlUnescapeA not found\n");
1440 "UrlUnescapeA returned 0x%x (expected S_OK) for \"%s\"\n",
1444 ZeroMemory(szReturnUrl,
sizeof(szReturnUrl));
1448 "UrlUnescapeA returned 0x%x (expected E_INVALIDARG) for \"%s\"\n",
1450 ok(
strcmp(szReturnUrl,
"")==0,
"Expected empty string\n");
1452 if (pUrlUnescapeW) {
1456 res = pUrlUnescapeW(urlW, ret_urlW, &dwEscaped, 0);
1458 "UrlUnescapeW returned 0x%x (expected S_OK) for \"%s\"\n",
1463 "Expected \"%s\", but got \"%s\" from \"%s\" flags %08lx\n",
1470 dwEscaped =
sizeof(inplace);
1472 ok(
res ==
S_OK,
"UrlUnescapeA returned 0x%x (expected S_OK)\n",
res);
1474 ok(dwEscaped == 27,
"got %d expected 27\n", dwEscaped);
1478 ok(
res ==
S_OK,
"UrlUnescapeA returned 0x%x (expected S_OK)\n",
res);
1481 if (pUrlUnescapeW) {
1482 dwEscaped =
sizeof(inplaceW);
1484 ok(
res ==
S_OK,
"UrlUnescapeW returned 0x%x (expected S_OK)\n",
res);
1485 ok(dwEscaped == 50,
"got %d expected 50\n", dwEscaped);
1489 ok(
res ==
S_OK,
"UrlUnescapeW returned 0x%x (expected S_OK)\n",
res);
1491 ok(
lstrlenW(another_inplaceW) == 24,
"got %d expected 24\n",
lstrlenW(another_inplaceW));
1528 memset(&parseda, 0xd0,
sizeof(parseda));
1529 parseda.
cbSize =
sizeof(parseda);
1530 hres = pParseURLA(
test->url, &parseda);
1535 ok(parseda.
cchProtocol ==
test->protocol_len,
"parseda.cchProtocol = %d, expected %d\n",
1537 ok(parseda.
pszSuffix ==
test->url+
test->protocol_len+1,
"parseda.pszSuffix = %s, expected %s\n",
1540 "parseda.pszSuffix = %d, expected %d\n",
1542 ok(parseda.
nScheme ==
test->scheme,
"parseda.nScheme = %d, expected %d\n",
1551 memset(&parsedw, 0xd0,
sizeof(parsedw));
1552 parsedw.
cbSize =
sizeof(parsedw);
1553 hres = pParseURLW(
url, &parsedw);
1558 ok(parsedw.
cchProtocol ==
test->protocol_len,
"parsedw.cchProtocol = %d, expected %d\n",
1560 ok(parsedw.
pszSuffix ==
url+
test->protocol_len+1,
"parsedw.pszSuffix = %s, expected %s\n",
1563 "parsedw.pszSuffix = %d, expected %d\n",
1565 ok(parsedw.
nScheme ==
test->scheme,
"parsedw.nScheme = %d, expected %d\n",
1577 BYTE input[16] = {0x51, 0x33, 0x4F, 0xA7, 0x45, 0x15, 0xF0, 0x52, 0x90,
1578 0x2B, 0xE7, 0xF5, 0xFD, 0xE1, 0xA6, 0xA7};
1580 static const BYTE expected[] = {0x54, 0x9C, 0x92, 0x55, 0xCD, 0x82, 0xFF,
1581 0xA1, 0x8E, 0x0F, 0xCF, 0x93, 0x14, 0xAA,
1583 static const BYTE expected2[] = {0x54, 0x9C, 0x92, 0x55, 0xCD, 0x82, 0xFF,
1584 0xA1, 0x8E, 0x0F, 0xCF, 0x93, 0x14, 0xAA,
1585 0xE3, 0x2D, 0x47, 0xFC, 0x80, 0xB8, 0xD0,
1586 0x49, 0xE6, 0x13, 0x2A, 0x30, 0x51, 0x8D,
1587 0xF9, 0x4B, 0x07, 0xA6};
1588 static const BYTE expected3[] = {0x2B, 0xDC, 0x9A, 0x1B, 0xF0, 0x5A, 0xF9,
1589 0xC6, 0xBE, 0x94, 0x6D, 0xF3, 0x33, 0xC1,
1594 res = pHashData(
input, 16, output, 16);
1595 ok(
res ==
S_OK,
"Expected HashData to return S_OK, got 0x%08x\n",
res);
1598 "Output buffer did not match expected contents\n");
1601 res = pHashData(
input, 16, output, 32);
1602 ok(
res ==
S_OK,
"Expected HashData to return S_OK, got 0x%08x\n",
res);
1605 "Output buffer did not match expected contents\n");
1608 res = pHashData(
input, 8, output, 16);
1609 ok(
res ==
S_OK,
"Expected HashData to return S_OK, got 0x%08x\n",
res);
1612 "Output buffer did not match expected contents\n");
1617 "Expected HashData to return E_INVALIDARG, got 0x%08x\n",
res);
1621 "Expected HashData to return E_INVALIDARG, got 0x%08x\n",
res);
1623 res = pHashData(
NULL, 0, output, 0);
1625 "Expected HashData to return E_INVALIDARG, got 0x%08x\n",
res);
1634 res = pHashData(
input, 0, output, 0);
1635 ok(
res ==
S_OK,
"Expected HashData to return S_OK, got 0x%08x\n",
res);
1640 ok(
input[
i] == 0x00,
"Expected the input buffer to be unchanged\n");
1641 if(
input[
i] != 0x00)
break;
1646 ok(output[
i] == 0xFF,
"Expected the output buffer to be unchanged\n");
1647 if(output[
i] != 0xFF)
break;
1651 res = pHashData((
BYTE *)0xdeadbeef, 0, (
BYTE *)0xdeadbeef, 0);
1652 ok(
res ==
S_OK,
"Expected HashData to return S_OK, got 0x%08x\n",
res);
1656 res = pHashData((
BYTE *)0xdeadbeef, 1, (
BYTE *)0xdeadbeef, 1);
1657 trace(
"HashData returned 0x%08x\n",
res);
1672 win_skip(
"Too old shlwapi version\n");
int strcmp(const char *String1, const char *String2)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
ACPI_SIZE strlen(const char *String)
#define GetProcAddress(x, y)
#define HeapFree(x, y, z)
#define WideCharToMultiByte
#define MultiByteToWideChar
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
int WINAPI lstrcmpA(LPCSTR str1, LPCSTR str2)
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
int WINAPI lstrcmpiA(LPCSTR str1, LPCSTR str2)
HRESULT WINAPI UrlEscapeW(LPCWSTR pszUrl, LPWSTR pszEscaped, LPDWORD pcchEscaped, DWORD dwFlags)
#define INTERNET_MAX_URL_LENGTH
GLenum GLenum GLenum input
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean flag
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define URL_E_INVALID_SYNTAX
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
int WINAPI lstrlenA(LPCSTR lpString)
#define memcpy(s1, s2, n)
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
#define todo_wine_if(is_todo)
static const WCHAR expected2[]
static const WCHAR expected3[]
static void test_UrlCombine(void)
static void test_UrlEscapeW(void)
static void test_HashData(void)
static const char * TEST_URL_3
static const TEST_URL_ESCAPEW TEST_ESCAPEW[]
static void test_ParseURL(void)
static void test_UrlHash(void)
static void test_url_canonicalize(int index, const char *szUrl, DWORD dwFlags, HRESULT dwExpectReturn, HRESULT dwExpectReturnAlt, const char *szExpectUrl, BOOL todo)
struct _TEST_URL_COMBINE TEST_URL_COMBINE
static const CHAR untouchedA[]
static void test_UrlCanonicalizeA(void)
static const WCHAR winehqW[]
struct _TEST_URL_ESCAPE TEST_URL_ESCAPE
static LPWSTR GetWideString(const char *szString)
static const struct @1719 TEST_PATH_IS_URL[]
static struct @1718 TEST_URL_UNESCAPE[]
static const TEST_URL_COMBINE TEST_COMBINE[]
static const TEST_URL_APPLY TEST_APPLY[]
static void hash_url(const char *szUrl)
static void test_UrlIs(void)
struct _TEST_URL_APPLY TEST_URL_APPLY
static const TEST_URL_CANONICALIZE TEST_CANONICALIZE[]
static const TEST_URL_ESCAPE TEST_ESCAPE[]
static void test_url_combine(const char *szUrl1, const char *szUrl2, DWORD dwFlags, HRESULT dwExpectReturn, const char *szExpectUrl, BOOL todo)
#define TEST_APPLY_MAX_LENGTH
static void test_UrlEscapeA(void)
static void test_url_part(const char *szUrl, DWORD dwPart, DWORD dwFlags, const char *szExpected)
static const char * TEST_URL_4
static void test_UrlUnescape(void)
static const char * TEST_URL_2
static void FreeWideString(LPWSTR wszString)
struct _TEST_URL_ESCAPEW TEST_URL_ESCAPEW
static const struct @1720 TEST_URLIS_ATTRIBS[]
static void test_UrlCanonicalizeW(void)
static void test_UrlApplyScheme(void)
static const CHAR winehqA[]
static void test_UrlGetPart(void)
struct _TEST_URL_CANONICALIZE TEST_URL_CANONICALIZE
static const char * TEST_URL_1
static const struct parse_url_test_t parse_url_tests[]
static void test_UrlCreateFromPath(void)
static void test_UrlIs_null(DWORD flag)
static const struct @1717 TEST_URLFROMPATH[]
static const WCHAR url1[]
static const WCHAR url2[]
static WCHAR file_url[INTERNET_MAX_URL_LENGTH]
#define URL_ESCAPE_UNSAFE
#define URL_WININET_COMPATIBILITY
#define URL_DONT_ESCAPE_EXTRA_INFO
#define URL_APPLY_FORCEAPPLY
#define URL_ESCAPE_AS_UTF8
#define URL_APPLY_GUESSSCHEME
#define URL_APPLY_DEFAULT
#define URL_PLUGGABLE_PROTOCOL
#define URL_ESCAPE_SPACES_ONLY
#define URL_ESCAPE_SEGMENT_ONLY
#define URL_DONT_SIMPLIFY
#define URL_UNESCAPE_INPLACE
#define URL_FILE_USE_PATHURL
#define URL_PARTFLAG_KEEPSCHEME
#define URL_APPLY_GUESSFILE
#define URL_ESCAPE_PERCENT
const WCHAR url[INTERNET_MAX_URL_LENGTH]
const WCHAR win7url[INTERNET_MAX_URL_LENGTH]
const WCHAR vistaurl[INTERNET_MAX_URL_LENGTH]
const WCHAR expecturl[INTERNET_MAX_URL_LENGTH]
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
DWORD WINAPI GetLastError(void)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags