Commit dcd2b994 authored by Thomas Mullaly's avatar Thomas Mullaly Committed by Alexandre Julliard

urlmon: Implemented IUri_GetFragment.

parent 004e1be6
......@@ -99,7 +99,7 @@ static const uri_properties uri_tests[] = {
{"http://www.winehq.org/",S_OK,TRUE}, /* DISPLAY_URI */
{"winehq.org",S_OK,FALSE}, /* DOMAIN */
{"",S_FALSE,FALSE}, /* EXTENSION */
{"",S_FALSE,TRUE}, /* FRAGMENT */
{"",S_FALSE,FALSE}, /* FRAGMENT */
{"www.winehq.org",S_OK,FALSE}, /* HOST */
{"",S_FALSE,FALSE}, /* PASSWORD */
{"/",S_OK,FALSE}, /* PATH */
......@@ -128,7 +128,7 @@ static const uri_properties uri_tests[] = {
{"http://winehq.org/tests",S_OK,TRUE},
{"winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/tests",S_OK,FALSE},
......@@ -157,7 +157,7 @@ static const uri_properties uri_tests[] = {
{"http://www.winehq.org/?query=x&return=y",S_OK,TRUE},
{"winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"www.winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -186,7 +186,7 @@ static const uri_properties uri_tests[] = {
{"http://example.com/path/a/Forbidden'%3C%7C%3E%20Characters",S_OK,TRUE},
{"example.com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"example.com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/path/a/Forbidden'%3C%7C%3E%20Characters",S_OK,FALSE},
......@@ -216,7 +216,7 @@ static const uri_properties uri_tests[] = {
{"ftp://ftp.winehq.org:9999/dir/foo%20bar.txt",S_OK,TRUE},
{"winehq.org",S_OK,FALSE},
{".txt",S_OK,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"ftp.winehq.org",S_OK,FALSE},
{"wine",S_OK,FALSE},
{"/dir/foo%20bar.txt",S_OK,FALSE},
......@@ -244,7 +244,7 @@ static const uri_properties uri_tests[] = {
{"file:///c:/tests/foo%2520bar.mp3",S_OK,TRUE},
{"",S_FALSE,FALSE},
{".mp3",S_OK,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"/c:/tests/foo%2520bar.mp3",S_OK,FALSE},
......@@ -272,7 +272,7 @@ static const uri_properties uri_tests[] = {
{"file:///tests/test%20file.README.txt",S_OK,TRUE},
{"",S_FALSE,FALSE},
{".txt",S_OK,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"/tests/test%20file.README.txt",S_OK,FALSE},
......@@ -300,7 +300,7 @@ static const uri_properties uri_tests[] = {
{"urn:nothing:should:happen here",S_OK,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"nothing:should:happen here",S_OK,FALSE},
......@@ -329,7 +329,7 @@ static const uri_properties uri_tests[] = {
{"http://127.0.0.1/test%20dir/test.txt",S_OK,TRUE},
{"",S_FALSE,FALSE},
{".txt",S_OK,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"127.0.0.1",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/test%20dir/test.txt",S_OK,FALSE},
......@@ -358,7 +358,7 @@ static const uri_properties uri_tests[] = {
{"http://[fedc:ba98:7654:3210:fedc:ba98:7654:3210]/",S_OK,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"fedc:ba98:7654:3210:fedc:ba98:7654:3210",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -387,7 +387,7 @@ static const uri_properties uri_tests[] = {
{"ftp://[::13.1.68.3]/",S_OK,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"::13.1.68.3",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -416,7 +416,7 @@ static const uri_properties uri_tests[] = {
{"http://[fedc:ba98::3210]/",S_OK,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"fedc:ba98::3210",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -445,7 +445,7 @@ static const uri_properties uri_tests[] = {
{"1234://www.winehq.org/",S_OK,TRUE},
{"winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"www.winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -474,7 +474,7 @@ static const uri_properties uri_tests[] = {
{"file:///C:/test/test.mp3",S_OK,TRUE},
{"",S_FALSE,FALSE},
{".mp3",S_OK,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"/C:/test/test.mp3",S_OK,FALSE},
......@@ -504,7 +504,7 @@ static const uri_properties uri_tests[] = {
{"file://server/test.mp3",S_OK,TRUE},
{"",S_FALSE,FALSE},
{".mp3",S_OK,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"server",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/test.mp3",S_OK,FALSE},
......@@ -533,7 +533,7 @@ static const uri_properties uri_tests[] = {
{"*:www.winehq.org/test",S_OK,TRUE},
{"winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"www.winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/test",S_OK,FALSE},
......@@ -563,7 +563,7 @@ static const uri_properties uri_tests[] = {
{"*:www.winehq.org/test",S_OK,TRUE},
{"winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"www.winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/test",S_OK,FALSE},
......@@ -591,7 +591,7 @@ static const uri_properties uri_tests[] = {
{"/../some dir/test.ext",S_OK,TRUE},
{"",S_FALSE,FALSE},
{".ext",S_OK,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"/../some dir/test.ext",S_OK,FALSE},
......@@ -619,7 +619,7 @@ static const uri_properties uri_tests[] = {
{"*://implicit/wildcard/uri%20scheme",S_OK,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"//implicit/wildcard/uri%20scheme",S_OK,FALSE},
......@@ -649,7 +649,7 @@ static const uri_properties uri_tests[] = {
{"zip:/.//google.com",S_OK,TRUE},
{"",S_FALSE,FALSE},
{".com",S_OK,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"/.//google.com",S_OK,FALSE},
......@@ -680,7 +680,7 @@ static const uri_properties uri_tests[] = {
{"ftp://winehq.org/",S_OK,TRUE},
{"winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"winehq.org",S_OK,FALSE},
{"pass:word",S_OK,FALSE},
{"/",S_OK,FALSE},
......@@ -711,7 +711,7 @@ static const uri_properties uri_tests[] = {
{"ftp://ftp.google.com/",S_OK,TRUE},
{"google.com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"ftp.google.com",S_OK,FALSE},
{"PASS",S_OK,FALSE},
{"/",S_OK,FALSE},
......@@ -742,7 +742,7 @@ static const uri_properties uri_tests[] = {
{"ftp://ftp.google.com/",S_OK,TRUE},
{"google.com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"ftp.google.com",S_OK,FALSE},
{"PA%7B%7D",S_OK,FALSE},
{"/",S_OK,FALSE},
......@@ -773,7 +773,7 @@ static const uri_properties uri_tests[] = {
{"ftp://ftp.google.com/",S_OK,TRUE},
{"google.com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"ftp.google.com",S_OK,FALSE},
{"",S_OK,FALSE},
{"/",S_OK,FALSE},
......@@ -804,7 +804,7 @@ static const uri_properties uri_tests[] = {
{"ftp://ftp.google.com/",S_OK,TRUE},
{"google.com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"ftp.google.com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -835,7 +835,7 @@ static const uri_properties uri_tests[] = {
{"ftp://ftp.google.com/",S_OK,TRUE},
{"google.com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"ftp.google.com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -865,7 +865,7 @@ static const uri_properties uri_tests[] = {
{"zip://%xy:word@winehq.org/",S_OK,TRUE},
{"winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"winehq.org",S_OK,FALSE},
{"word",S_OK,FALSE},
{"/",S_OK,FALSE},
......@@ -897,7 +897,7 @@ static const uri_properties uri_tests[] = {
{"zip://%2E:%52%53ord@winehq.org/",S_OK,TRUE},
{"winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"winehq.org",S_OK,FALSE},
{"%52%53ord",S_OK,FALSE},
{"/",S_OK,FALSE},
......@@ -927,7 +927,7 @@ static const uri_properties uri_tests[] = {
{"ftp://winehq.org/",S_OK,TRUE},
{"winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"winehq.org",S_OK,FALSE},
{"word",S_OK,FALSE},
{"/",S_OK,FALSE},
......@@ -956,7 +956,7 @@ static const uri_properties uri_tests[] = {
{"ftp://test/?:word@winehq.org/",S_OK,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"test",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -985,7 +985,7 @@ static const uri_properties uri_tests[] = {
{"ftp://test/#:word@winehq.org/",S_OK,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"#:word@winehq.org/",S_OK,TRUE},
{"#:word@winehq.org/",S_OK,FALSE},
{"test",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -1015,7 +1015,7 @@ static const uri_properties uri_tests[] = {
{"zip://test\\:word@winehq.org/",S_OK,TRUE},
{"winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"winehq.org",S_OK,FALSE},
{"word",S_OK,FALSE},
{"/",S_OK,FALSE},
......@@ -1045,7 +1045,7 @@ static const uri_properties uri_tests[] = {
{"http://127.0.0.100/",S_OK,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"127.0.0.100",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -1075,7 +1075,7 @@ static const uri_properties uri_tests[] = {
{"http://127.0.0.0/",S_OK,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"127.0.0.0",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -1105,7 +1105,7 @@ static const uri_properties uri_tests[] = {
{"http://0.1.226.64/",S_OK,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"0.1.226.64",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -1135,7 +1135,7 @@ static const uri_properties uri_tests[] = {
{"http://255.255.255.255/",S_OK,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"255.255.255.255",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -1165,7 +1165,7 @@ static const uri_properties uri_tests[] = {
{"http://4294967296/",S_OK,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"4294967296",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -1195,7 +1195,7 @@ static const uri_properties uri_tests[] = {
{"1234://4294967295/",S_OK,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"4294967295",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -1225,7 +1225,7 @@ static const uri_properties uri_tests[] = {
{"1234://127.001/",S_OK,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"127.001",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -1254,7 +1254,7 @@ static const uri_properties uri_tests[] = {
{"http://[fedc:ba98::3210]/",S_OK,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"fedc:ba98::3210",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -1283,7 +1283,7 @@ static const uri_properties uri_tests[] = {
{"http://[::]/",S_OK,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"::",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -1312,7 +1312,7 @@ static const uri_properties uri_tests[] = {
{"http://[fedc:ba98::]/",S_OK,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"fedc:ba98::",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -1342,7 +1342,7 @@ static const uri_properties uri_tests[] = {
{"http://[1:0:3:4:5:6:7:8]/",S_OK,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"1:0:3:4:5:6:7:8",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -1371,7 +1371,7 @@ static const uri_properties uri_tests[] = {
{"http://[v2.34]/",S_OK,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"[v2.34]",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -1401,7 +1401,7 @@ static const uri_properties uri_tests[] = {
{"http://[xyz:12345.com/test",S_OK,TRUE},
{"[xyz:12345.com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"[xyz:12345.com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/test",S_OK,FALSE},
......@@ -1433,7 +1433,7 @@ static const uri_properties uri_tests[] = {
{"ftp://www.[works].com/",S_OK,TRUE},
{"[works].com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"www.[works].com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -1463,7 +1463,7 @@ static const uri_properties uri_tests[] = {
{"http://www.google.com]:12345/",S_OK,TRUE},
{"google.com]",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"www.google.com]",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -1493,7 +1493,7 @@ static const uri_properties uri_tests[] = {
{"zip://w%XXw%GEw.google.com/",S_OK,TRUE},
{"google.com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"w%XXw%GEw.google.com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -1523,7 +1523,7 @@ static const uri_properties uri_tests[] = {
{"zip://GOOGLE.com/",S_OK,TRUE},
{"GOOGLE.com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"GOOGLE.com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -1553,7 +1553,7 @@ static const uri_properties uri_tests[] = {
{"http://www.google.com/",S_OK,TRUE},
{"google.com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"www.google.com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -1585,7 +1585,7 @@ static const uri_properties uri_tests[] = {
{"http://www.%7cgoogle%7c.com/",S_OK,TRUE},
{"%7cgoogle%7c.com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"www.%7cgoogle%7c.com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -1615,7 +1615,7 @@ static const uri_properties uri_tests[] = {
{"http://[1:2:3:4:5:6::]/",S_OK,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"1:2:3:4:5:6::",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -1645,7 +1645,7 @@ static const uri_properties uri_tests[] = {
{"http://[::1.2.3.0]/",S_OK,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"::1.2.3.0",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -1675,7 +1675,7 @@ static const uri_properties uri_tests[] = {
{"zip://[0001:0:000:0004:0005:0006:001.002.003.000]/",S_OK,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"0001:0:000:0004:0005:0006:001.002.003.000",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -1705,7 +1705,7 @@ static const uri_properties uri_tests[] = {
{"http://[ffff::c0de:6f20]/",S_OK,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"ffff::c0de:6f20",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -1735,7 +1735,7 @@ static const uri_properties uri_tests[] = {
{"http://google.com:65535/",S_OK,TRUE},
{"google.com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"google.com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -1764,7 +1764,7 @@ static const uri_properties uri_tests[] = {
{"zip://google.com:65536/",S_OK,TRUE},
{"google.com:65536",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"google.com:65536",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -1793,7 +1793,7 @@ static const uri_properties uri_tests[] = {
{"zip://google.com:65536:25/",S_OK,TRUE},
{"google.com:65536:25",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"google.com:65536:25",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -1822,7 +1822,7 @@ static const uri_properties uri_tests[] = {
{"zip://[::ffff]:abcd/",S_OK,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"[::ffff]:abcd",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -1851,7 +1851,7 @@ static const uri_properties uri_tests[] = {
{"zip://127.0.0.1:abcd/",S_OK,TRUE},
{"0.1:abcd",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"127.0.0.1:abcd",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -1880,7 +1880,7 @@ static const uri_properties uri_tests[] = {
{"http://google.com:00035",S_OK,TRUE,"http://google.com:35"},
{"google.com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"google.com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
......@@ -1909,7 +1909,7 @@ static const uri_properties uri_tests[] = {
{"http://google.com:80",S_OK,TRUE},
{"google.com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"google.com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
......@@ -1938,7 +1938,7 @@ static const uri_properties uri_tests[] = {
{"http://google.com.uk/",S_OK,TRUE},
{"google.com.uk",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"google.com.uk",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -1967,7 +1967,7 @@ static const uri_properties uri_tests[] = {
{"http://google.com.com/",S_OK,TRUE},
{"com.com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"google.com.com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -1996,7 +1996,7 @@ static const uri_properties uri_tests[] = {
{"http://google.uk.1/",S_OK,TRUE},
{"google.uk.1",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"google.uk.1",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -2026,7 +2026,7 @@ static const uri_properties uri_tests[] = {
{"http://google.foo.uk/",S_OK,TRUE},
{"foo.uk",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"google.foo.uk",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -2055,7 +2055,7 @@ static const uri_properties uri_tests[] = {
{"http://.com/",S_OK,TRUE},
{".com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{".com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -2084,7 +2084,7 @@ static const uri_properties uri_tests[] = {
{"http://.uk/",S_OK,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{".uk",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -2113,7 +2113,7 @@ static const uri_properties uri_tests[] = {
{"http://www.co.google.com.[]/",S_OK,TRUE},
{"google.com.[]",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"www.co.google.com.[]",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -2142,7 +2142,7 @@ static const uri_properties uri_tests[] = {
{"http://co.uk/",S_OK,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"co.uk",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -2171,7 +2171,7 @@ static const uri_properties uri_tests[] = {
{"http://www.co.google.us.test/",S_OK,TRUE},
{"us.test",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"www.co.google.us.test",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -2200,7 +2200,7 @@ static const uri_properties uri_tests[] = {
{"http://gov.uk/",S_OK,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"gov.uk",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -2228,7 +2228,7 @@ static const uri_properties uri_tests[] = {
{"zip://www.google.com\\test",S_OK,TRUE},
{"google.com\\test",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"www.google.com\\test",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
......@@ -2256,7 +2256,7 @@ static const uri_properties uri_tests[] = {
{"urn:excepts:bad:%XY:encoded",S_OK,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"excepts:bad:%XY:encoded",S_OK,FALSE},
......@@ -2287,7 +2287,7 @@ static const uri_properties uri_tests[] = {
{"file:///C:/te%253Es%252Et/tes%25t.mp3",S_OK,TRUE},
{"",S_FALSE,FALSE},
{".mp3",S_OK,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"/C:/te%253Es%252Et/tes%25t.mp3",S_OK,FALSE},
......@@ -2318,7 +2318,7 @@ static const uri_properties uri_tests[] = {
{"file:///C:/te%3Es.t/t#es%25t.mp3",S_OK,TRUE},
{"",S_FALSE,FALSE},
{".mp3",S_OK,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"/C:/te%3Es.t/t#es%25t.mp3",S_OK,FALSE},
......@@ -2348,7 +2348,7 @@ static const uri_properties uri_tests[] = {
{"http://[::1.2.3.0]/%3F%23.T/test",S_OK,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"::1.2.3.0",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/%3F%23.T/test",S_OK,FALSE},
......@@ -2377,7 +2377,7 @@ static const uri_properties uri_tests[] = {
{"file:///C:/%22test%22/test.mp3",S_OK,TRUE},
{"",S_FALSE,FALSE},
{".mp3",S_OK,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"/C:/%22test%22/test.mp3",S_OK,FALSE},
......@@ -2407,7 +2407,7 @@ static const uri_properties uri_tests[] = {
{"1234://4294967295/<|>\" test<|>",S_OK,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"4294967295",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/<|>\" test<|>",S_OK,FALSE},
......@@ -2437,7 +2437,7 @@ static const uri_properties uri_tests[] = {
{"http://gov.uk/%3C%7C%3E%20test%3C%7C%3E",S_OK,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"gov.uk",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/%3C%7C%3E%20test%3C%7C%3E",S_OK,FALSE},
......@@ -2466,7 +2466,7 @@ static const uri_properties uri_tests[] = {
{"http://gov.uk/",S_OK,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"gov.uk",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -2495,7 +2495,7 @@ static const uri_properties uri_tests[] = {
{"http://gov.uk/",S_OK,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"gov.uk",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -2524,7 +2524,7 @@ static const uri_properties uri_tests[] = {
{"http://gov.uk/",S_OK,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"gov.uk",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -2552,7 +2552,7 @@ static const uri_properties uri_tests[] = {
{"file:///c:/foo%2520bar.mp3",S_OK,TRUE},
{"",S_FALSE,FALSE},
{".mp3",S_OK,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"/c:/foo%2520bar.mp3",S_OK,FALSE},
......@@ -2582,7 +2582,7 @@ static const uri_properties uri_tests[] = {
{"zip://gov.uk/",S_OK,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"gov.uk",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -2612,7 +2612,7 @@ static const uri_properties uri_tests[] = {
{"http://gov.uk/test/test2/../../.",S_OK,TRUE},
{"",S_FALSE,FALSE},
{".",S_OK,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"gov.uk",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/test/test2/../../.",S_OK,FALSE},
......@@ -2642,7 +2642,7 @@ static const uri_properties uri_tests[] = {
{"*:gov.uk/test/test2/../../.",S_OK,TRUE},
{"",S_FALSE,FALSE},
{".",S_OK,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"gov.uk",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/test/test2/../../.",S_OK,FALSE},
......@@ -2671,7 +2671,7 @@ static const uri_properties uri_tests[] = {
{"mailto:%22acco%3C%7C%3Eunt@example.com%22",S_OK,TRUE},
{"",S_FALSE,FALSE},
{".com%22",S_OK,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"%22acco%3C%7C%3Eunt@example.com%22",S_OK,FALSE},
......@@ -2699,7 +2699,7 @@ static const uri_properties uri_tests[] = {
{"news:test.tes%3C%7C%3Et.com",S_OK,TRUE},
{"",S_FALSE,FALSE},
{".com",S_OK,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"test.tes%3C%7C%3Et.com",S_OK,FALSE},
......@@ -2728,7 +2728,7 @@ static const uri_properties uri_tests[] = {
{"news:test.tes<|>t.com",S_OK,TRUE},
{"",S_FALSE,FALSE},
{".com",S_OK,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"test.tes<|>t.com",S_OK,FALSE},
......@@ -2757,7 +2757,7 @@ static const uri_properties uri_tests[] = {
{"urn:test.tes<|>t.com",S_OK,TRUE},
{"",S_FALSE,FALSE},
{".com",S_OK,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"test.tes<|>t.com",S_OK,FALSE},
......@@ -2786,7 +2786,7 @@ static const uri_properties uri_tests[] = {
{"news:test.test.com",S_OK,TRUE},
{"",S_FALSE,FALSE},
{".com",S_OK,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"test.test.com",S_OK,FALSE},
......@@ -2815,7 +2815,7 @@ static const uri_properties uri_tests[] = {
{"news:test.test.com",S_OK,TRUE},
{"",S_FALSE,FALSE},
{".com",S_OK,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"test.test.com",S_OK,FALSE},
......@@ -2844,7 +2844,7 @@ static const uri_properties uri_tests[] = {
{"urn:test.%74%65%73%74.com",S_OK,TRUE},
{"",S_FALSE,FALSE},
{".com",S_OK,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"test.%74%65%73%74.com",S_OK,FALSE},
......@@ -2874,7 +2874,7 @@ static const uri_properties uri_tests[] = {
{"zip://www.winehq.org/?query=%xx&return=y",S_OK,TRUE},
{"winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"www.winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -2904,7 +2904,7 @@ static const uri_properties uri_tests[] = {
{"http://www.winehq.org/?query=%xx&return=y",S_OK,TRUE},
{"winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"www.winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -2934,7 +2934,7 @@ static const uri_properties uri_tests[] = {
{"http://www.winehq.org/?query=<|>&return=y",S_OK,TRUE},
{"winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"www.winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -2964,7 +2964,7 @@ static const uri_properties uri_tests[] = {
{"http://www.winehq.org/?query=<|>&return=y",S_OK,TRUE},
{"winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"www.winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -2994,7 +2994,7 @@ static const uri_properties uri_tests[] = {
{"http://www.winehq.org/?query=%3C%7C%3E&return=y",S_OK,TRUE},
{"winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"www.winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -3024,7 +3024,7 @@ static const uri_properties uri_tests[] = {
{"zip://www.winehq.org/?query=<|>&return=y",S_OK,TRUE},
{"winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"www.winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -3054,7 +3054,7 @@ static const uri_properties uri_tests[] = {
{"http://www.winehq.org/?query=01&return=y",S_OK,TRUE},
{"winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"www.winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -3084,7 +3084,7 @@ static const uri_properties uri_tests[] = {
{"zip://www.winehq.org/?query=%30%31&return=y",S_OK,TRUE},
{"winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"www.winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -3114,7 +3114,7 @@ static const uri_properties uri_tests[] = {
{"http://www.winehq.org/?query=%30%31&return=y",S_OK,TRUE},
{"winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"www.winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
......@@ -3143,7 +3143,7 @@ static const uri_properties uri_tests[] = {
{"http://www.winehq.org?query=12&return=y",S_OK,TRUE},
{"winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"www.winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
......@@ -3173,7 +3173,7 @@ static const uri_properties uri_tests[] = {
{"zip://www.winehq.org/tests/#Te%xx",S_OK,TRUE},
{"winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"#Te%xx",S_OK,TRUE},
{"#Te%xx",S_OK,FALSE},
{"www.winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/tests/",S_OK,FALSE},
......@@ -3203,7 +3203,7 @@ static const uri_properties uri_tests[] = {
{"zip://www.winehq.org/tests/#Te<|>",S_OK,TRUE},
{"winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"#Te<|>",S_OK,TRUE},
{"#Te<|>",S_OK,FALSE},
{"www.winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/tests/",S_OK,FALSE},
......@@ -3233,7 +3233,7 @@ static const uri_properties uri_tests[] = {
{"http://www.winehq.org/tests/#Te%3C%7C%3E",S_OK,TRUE},
{"winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"#Te%3C%7C%3E",S_OK,TRUE},
{"#Te%3C%7C%3E",S_OK,FALSE},
{"www.winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/tests/",S_OK,FALSE},
......@@ -3263,7 +3263,7 @@ static const uri_properties uri_tests[] = {
{"http://www.winehq.org/tests/#Te<|>",S_OK,TRUE},
{"winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"#Te<|>",S_OK,TRUE},
{"#Te<|>",S_OK,FALSE},
{"www.winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/tests/",S_OK,FALSE},
......@@ -3293,7 +3293,7 @@ static const uri_properties uri_tests[] = {
{"http://www.winehq.org/tests/#Te<|>",S_OK,TRUE},
{"winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"#Te<|>",S_OK,TRUE},
{"#Te<|>",S_OK,FALSE},
{"www.winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/tests/",S_OK,FALSE},
......@@ -3323,7 +3323,7 @@ static const uri_properties uri_tests[] = {
{"zip://www.winehq.org/tests/#Te%30%31%32",S_OK,TRUE},
{"winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"#Te%30%31%32",S_OK,TRUE},
{"#Te%30%31%32",S_OK,FALSE},
{"www.winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/tests/",S_OK,FALSE},
......@@ -3353,7 +3353,7 @@ static const uri_properties uri_tests[] = {
{"http://www.winehq.org/tests/#Te012",S_OK,TRUE},
{"winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"#Te012",S_OK,TRUE},
{"#Te012",S_OK,FALSE},
{"www.winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/tests/",S_OK,FALSE},
......@@ -3383,7 +3383,7 @@ static const uri_properties uri_tests[] = {
{"http://www.winehq.org/tests/#Te012",S_OK,TRUE},
{"winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"#Te012",S_OK,TRUE},
{"#Te012",S_OK,FALSE},
{"www.winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/tests/",S_OK,FALSE},
......@@ -3413,7 +3413,7 @@ static const uri_properties uri_tests[] = {
{"http://www.winehq.org/tests/#Te%30%31%32",S_OK,TRUE},
{"winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"#Te%30%31%32",S_OK,TRUE},
{"#Te%30%31%32",S_OK,FALSE},
{"www.winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/tests/",S_OK,FALSE},
......@@ -3900,12 +3900,13 @@ static void test_IUri_GetStrProperties(void) {
SysFreeString(received);
received = NULL;
/* GetFragment() tests. */
prop = test.str_props[Uri_PROPERTY_FRAGMENT];
hr = IUri_GetFragment(uri, &received);
skip_unimplemented:
/* GetAuthority() tests. */
prop = test.str_props[Uri_PROPERTY_AUTHORITY];
hr = IUri_GetAuthority(uri, &received);
if(prop.todo) {
todo_wine {
ok(hr == prop.expected, "Error: GetFragment returned 0x%08x, expected 0x%08x on uri_tests[%d].\n",
ok(hr == prop.expected, "Error: GetAuthority returned 0x%08x, expected 0x%08x on uri_tests[%d].\n",
hr, prop.expected, i);
}
todo_wine {
......@@ -3913,7 +3914,7 @@ static void test_IUri_GetStrProperties(void) {
prop.value, wine_dbgstr_w(received), i);
}
} else {
ok(hr == prop.expected, "Error: GetFragment returned 0x%08x, expected 0x%08x on uri_tests[%d].\n",
ok(hr == prop.expected, "Error: GetAuthority returned 0x%08x, expected 0x%08x on uri_tests[%d].\n",
hr, prop.expected, i);
ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n",
prop.value, wine_dbgstr_w(received), i);
......@@ -3921,12 +3922,12 @@ static void test_IUri_GetStrProperties(void) {
SysFreeString(received);
received = NULL;
/* GetPassword() tests. */
prop = test.str_props[Uri_PROPERTY_PASSWORD];
hr = IUri_GetPassword(uri, &received);
/* GetDomain() tests. */
prop = test.str_props[Uri_PROPERTY_DOMAIN];
hr = IUri_GetDomain(uri, &received);
if(prop.todo) {
todo_wine {
ok(hr == prop.expected, "Error: GetPassword returned 0x%08x, expected 0x%08x on uri_tests[%d].\n",
ok(hr == prop.expected, "Error: GetDomain returned 0x%08x, expected 0x%08x on uri_tests[%d].\n",
hr, prop.expected, i);
}
todo_wine {
......@@ -3934,7 +3935,7 @@ static void test_IUri_GetStrProperties(void) {
prop.value, wine_dbgstr_w(received), i);
}
} else {
ok(hr == prop.expected, "Error: GetPassword returned 0x%08x, expected 0x%08x on uri_tests[%d].\n",
ok(hr == prop.expected, "Error: GetDomain returned 0x%08x, expected 0x%08x on uri_tests[%d].\n",
hr, prop.expected, i);
ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n",
prop.value, wine_dbgstr_w(received), i);
......@@ -3942,13 +3943,12 @@ static void test_IUri_GetStrProperties(void) {
SysFreeString(received);
received = NULL;
skip_unimplemented:
/* GetAuthority() tests. */
prop = test.str_props[Uri_PROPERTY_AUTHORITY];
hr = IUri_GetAuthority(uri, &received);
/* GetExtension() tests. */
prop = test.str_props[Uri_PROPERTY_EXTENSION];
hr = IUri_GetExtension(uri, &received);
if(prop.todo) {
todo_wine {
ok(hr == prop.expected, "Error: GetAuthority returned 0x%08x, expected 0x%08x on uri_tests[%d].\n",
ok(hr == prop.expected, "Error: GetExtension returned 0x%08x, expected 0x%08x on uri_tests[%d].\n",
hr, prop.expected, i);
}
todo_wine {
......@@ -3956,7 +3956,7 @@ static void test_IUri_GetStrProperties(void) {
prop.value, wine_dbgstr_w(received), i);
}
} else {
ok(hr == prop.expected, "Error: GetAuthority returned 0x%08x, expected 0x%08x on uri_tests[%d].\n",
ok(hr == prop.expected, "Error: GetExtension returned 0x%08x, expected 0x%08x on uri_tests[%d].\n",
hr, prop.expected, i);
ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n",
prop.value, wine_dbgstr_w(received), i);
......@@ -3964,12 +3964,12 @@ static void test_IUri_GetStrProperties(void) {
SysFreeString(received);
received = NULL;
/* GetDomain() tests. */
prop = test.str_props[Uri_PROPERTY_DOMAIN];
hr = IUri_GetDomain(uri, &received);
/* GetFragment() tests. */
prop = test.str_props[Uri_PROPERTY_FRAGMENT];
hr = IUri_GetFragment(uri, &received);
if(prop.todo) {
todo_wine {
ok(hr == prop.expected, "Error: GetDomain returned 0x%08x, expected 0x%08x on uri_tests[%d].\n",
ok(hr == prop.expected, "Error: GetFragment returned 0x%08x, expected 0x%08x on uri_tests[%d].\n",
hr, prop.expected, i);
}
todo_wine {
......@@ -3977,7 +3977,7 @@ static void test_IUri_GetStrProperties(void) {
prop.value, wine_dbgstr_w(received), i);
}
} else {
ok(hr == prop.expected, "Error: GetDomain returned 0x%08x, expected 0x%08x on uri_tests[%d].\n",
ok(hr == prop.expected, "Error: GetFragment returned 0x%08x, expected 0x%08x on uri_tests[%d].\n",
hr, prop.expected, i);
ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n",
prop.value, wine_dbgstr_w(received), i);
......@@ -3985,12 +3985,12 @@ static void test_IUri_GetStrProperties(void) {
SysFreeString(received);
received = NULL;
/* GetExtension() tests. */
prop = test.str_props[Uri_PROPERTY_EXTENSION];
hr = IUri_GetExtension(uri, &received);
/* GetHost() tests. */
prop = test.str_props[Uri_PROPERTY_HOST];
hr = IUri_GetHost(uri, &received);
if(prop.todo) {
todo_wine {
ok(hr == prop.expected, "Error: GetExtension returned 0x%08x, expected 0x%08x on uri_tests[%d].\n",
ok(hr == prop.expected, "Error: GetHost returned 0x%08x, expected 0x%08x on uri_tests[%d].\n",
hr, prop.expected, i);
}
todo_wine {
......@@ -3998,7 +3998,7 @@ static void test_IUri_GetStrProperties(void) {
prop.value, wine_dbgstr_w(received), i);
}
} else {
ok(hr == prop.expected, "Error: GetExtension returned 0x%08x, expected 0x%08x on uri_tests[%d].\n",
ok(hr == prop.expected, "Error: GetHost returned 0x%08x, expected 0x%08x on uri_tests[%d].\n",
hr, prop.expected, i);
ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n",
prop.value, wine_dbgstr_w(received), i);
......@@ -4006,12 +4006,12 @@ static void test_IUri_GetStrProperties(void) {
SysFreeString(received);
received = NULL;
/* GetHost() tests. */
prop = test.str_props[Uri_PROPERTY_HOST];
hr = IUri_GetHost(uri, &received);
/* GetPassword() tests. */
prop = test.str_props[Uri_PROPERTY_PASSWORD];
hr = IUri_GetPassword(uri, &received);
if(prop.todo) {
todo_wine {
ok(hr == prop.expected, "Error: GetHost returned 0x%08x, expected 0x%08x on uri_tests[%d].\n",
ok(hr == prop.expected, "Error: GetPassword returned 0x%08x, expected 0x%08x on uri_tests[%d].\n",
hr, prop.expected, i);
}
todo_wine {
......@@ -4019,7 +4019,7 @@ static void test_IUri_GetStrProperties(void) {
prop.value, wine_dbgstr_w(received), i);
}
} else {
ok(hr == prop.expected, "Error: GetHost returned 0x%08x, expected 0x%08x on uri_tests[%d].\n",
ok(hr == prop.expected, "Error: GetPassword returned 0x%08x, expected 0x%08x on uri_tests[%d].\n",
hr, prop.expected, i);
ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n",
prop.value, wine_dbgstr_w(received), i);
......
......@@ -3075,6 +3075,19 @@ static HRESULT WINAPI Uri_GetPropertyBSTR(IUri *iface, Uri_PROPERTY uriProp, BST
hres = E_OUTOFMEMORY;
break;
case Uri_PROPERTY_FRAGMENT:
if(This->fragment_start > -1) {
*pbstrProperty = SysAllocStringLen(This->canon_uri+This->fragment_start, This->fragment_len);
hres = S_OK;
} else {
*pbstrProperty = SysAllocStringLen(NULL, 0);
hres = S_FALSE;
}
if(!(*pbstrProperty))
hres = E_OUTOFMEMORY;
break;
case Uri_PROPERTY_HOST:
if(This->host_start > -1) {
/* The '[' and ']' aren't included for IPv6 addresses. */
......@@ -3254,6 +3267,10 @@ static HRESULT WINAPI Uri_GetPropertyLength(IUri *iface, Uri_PROPERTY uriProp, D
}
break;
case Uri_PROPERTY_FRAGMENT:
*pcchProperty = This->fragment_len;
hres = (This->fragment_start > -1) ? S_OK : S_FALSE;
break;
case Uri_PROPERTY_HOST:
*pcchProperty = This->host_len;
......@@ -3408,13 +3425,8 @@ static HRESULT WINAPI Uri_GetExtension(IUri *iface, BSTR *pstrExtension)
static HRESULT WINAPI Uri_GetFragment(IUri *iface, BSTR *pstrFragment)
{
Uri *This = URI_THIS(iface);
FIXME("(%p)->(%p)\n", This, pstrFragment);
if(!pstrFragment)
return E_POINTER;
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", iface, pstrFragment);
return Uri_GetPropertyBSTR(iface, Uri_PROPERTY_FRAGMENT, pstrFragment, 0);
}
static HRESULT WINAPI Uri_GetHost(IUri *iface, BSTR *pstrHost)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment