Zebediah Figura : shlwapi/tests: Fix a test failure with the UTF-8 code page.
Alexandre Julliard
julliard at winehq.org
Mon May 16 15:37:57 CDT 2022
Module: wine
Branch: master
Commit: 588bd3e7f24a66ea0c267260b20cc8c04fa75d8a
URL: https://source.winehq.org/git/wine.git/?a=commit;h=588bd3e7f24a66ea0c267260b20cc8c04fa75d8a
Author: Zebediah Figura <zfigura at codeweavers.com>
Date: Sat May 14 17:05:11 2022 -0500
shlwapi/tests: Fix a test failure with the UTF-8 code page.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52870
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/shlwapi/tests/url.c | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/dlls/shlwapi/tests/url.c b/dlls/shlwapi/tests/url.c
index 6957e244213..6870de4ee5f 100644
--- a/dlls/shlwapi/tests/url.c
+++ b/dlls/shlwapi/tests/url.c
@@ -674,10 +674,10 @@ static void test_UrlGetPart(void)
/* All characters, other than those with special meaning, are allowed. */
{"http://foo:bar@google.*.com:21/internal.php?query=x&return=y", URL_PART_HOSTNAME, 0, S_OK, "google.*.com"},
- {"http:// !\"$%&'()*+,-.;<=>[]^_`{|~}\x01\x7f\xff:pass at host", URL_PART_USERNAME, 0, S_OK, " !\"$%&'()*+,-.;<=>[]^_`{|~}\x01\x7f\xff"},
- {"http://user: !\"$%&'()*+,-.;<=>[]^_`{|~}\x01\x7f\xff at host", URL_PART_PASSWORD, 0, S_OK, " !\"$%&'()*+,-.;<=>[]^_`{|~}\x01\x7f\xff"},
- {"http:// !\"$%&'()*+,-.;<=>[]^_`{|~}\x01\x7f\xff", URL_PART_HOSTNAME, 0, S_OK, " !\"$%&'()*+,-.;<=>[]^_`{|~}\x01\x7f\xff"},
- {"http://host: !\"$%&'()*+,-.;<=>[]^_`{|~}\x01\x7f\xff", URL_PART_PORT, 0, S_OK, " !\"$%&'()*+,-.;<=>[]^_`{|~}\x01\x7f\xff"},
+ {"http:// !\"$%&'()*+,-.;<=>[]^_`{|~}:pass at host", URL_PART_USERNAME, 0, S_OK, " !\"$%&'()*+,-.;<=>[]^_`{|~}"},
+ {"http://user: !\"$%&'()*+,-.;<=>[]^_`{|~}@host", URL_PART_PASSWORD, 0, S_OK, " !\"$%&'()*+,-.;<=>[]^_`{|~}"},
+ {"http:// !\"$%&'()*+,-.;<=>[]^_`{|~}", URL_PART_HOSTNAME, 0, S_OK, " !\"$%&'()*+,-.;<=>[]^_`{|~}"},
+ {"http://host: !\"$%&'()*+,-.;<=>[]^_`{|~}", URL_PART_PORT, 0, S_OK, " !\"$%&'()*+,-.;<=>[]^_`{|~}"},
{"http:///index.html", URL_PART_HOSTNAME, 0, S_FALSE, ""},
{"http:///index.html", URL_PART_HOSTNAME, URL_PARTFLAG_KEEPSCHEME, S_OK, "http:"},
@@ -855,6 +855,15 @@ static void test_UrlGetPart(void)
winetest_pop_context();
}
+
+ /* Test non-ASCII characters. */
+
+ size = ARRAY_SIZE(bufferW);
+ wcscpy(bufferW, L"x");
+ hr = UrlGetPartW(L"http://\x01\x7f\x80\xff:pass@host", bufferW, &size, URL_PART_USERNAME, 0);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
+ ok(size == wcslen(bufferW), "Got size %lu.\n", size);
+ ok(!wcscmp(bufferW, L"\x01\x7f\x80\xff"), "Got result %s.\n", debugstr_w(bufferW));
}
/* ########################### */
More information about the wine-cvs
mailing list