Sebastian Lackner : wininet/tests: Add a test for recently introduced regression related to InternetCrackUrl.

Alexandre Julliard julliard at winehq.org
Fri Jul 8 10:02:06 CDT 2016


Module: wine
Branch: master
Commit: 93832ef88da8662f9991958413b0d46b07b3a80f
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=93832ef88da8662f9991958413b0d46b07b3a80f

Author: Sebastian Lackner <sebastian at fds-team.de>
Date:   Fri Jul  8 13:10:09 2016 +0200

wininet/tests: Add a test for recently introduced regression related to InternetCrackUrl.

Signed-off-by: Sebastian Lackner <sebastian at fds-team.de>
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wininet/tests/url.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/dlls/wininet/tests/url.c b/dlls/wininet/tests/url.c
index 9be3839..7b1fd72 100644
--- a/dlls/wininet/tests/url.c
+++ b/dlls/wininet/tests/url.c
@@ -806,6 +806,19 @@ static void InternetCrackUrlW_test(void)
     ok( r, "InternetCrackUrlW failed unexpectedly\n");
     ok( host[0] == 'x', "host should be x.org\n");
     ok( urlpart[0] == 0, "urlpart should be empty\n");
+
+    urlpart[0] = 0;
+    host[0] = 0;
+    memset(&comp, 0, sizeof(comp));
+    comp.dwStructSize = sizeof(comp);
+    comp.lpszHostName = host;
+    comp.dwHostNameLength = sizeof(host)/sizeof(host[0]);
+    comp.lpszUrlPath = urlpart;
+    comp.dwUrlPathLength = sizeof(urlpart)/sizeof(urlpart[0]);
+    r = InternetCrackUrlW(url3, 0, ICU_DECODE, &comp);
+    todo_wine ok(r, "InternetCrackUrlW failed unexpectedly\n");
+    todo_wine ok(!strcmp_wa(host, "x.org"), "host is %s, should be x.org\n", wine_dbgstr_w(host));
+    ok(urlpart[0] == 0, "urlpart should be empty\n");
 }
 
 static void fill_url_components(URL_COMPONENTSA *lpUrlComponents)




More information about the wine-cvs mailing list