Hans Leidekker : shlwapi: Add a couple of tests for UrlUnescape.
Module: wine Branch: master Commit: 96b89623afb36a867e3cb9a1830d7eb1b53089e0 URL: http://source.winehq.org/git/wine.git/?a=commit;h=96b89623afb36a867e3cb9a183... Author: Hans Leidekker <hans(a)meelstraat.net> Date: Sun Jun 29 16:03:55 2008 +0200 shlwapi: Add a couple of tests for UrlUnescape. --- dlls/shlwapi/tests/url.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dlls/shlwapi/tests/url.c b/dlls/shlwapi/tests/url.c index 970b7fb..3b0633a 100644 --- a/dlls/shlwapi/tests/url.c +++ b/dlls/shlwapi/tests/url.c @@ -801,8 +801,8 @@ static void test_UrlUnescape(void) DWORD dwEscaped; size_t i; static char inplace[] = "file:///C:/Program%20Files"; - static WCHAR inplaceW[] = {'f','i','l','e',':','/','/','/','C',':','/', - 'P','r','o','g','r','a','m','%','2','0','F','i','l','e','s',0}; + static const char expected[] = "file:///C:/Program Files"; + static WCHAR inplaceW[] = {'f','i','l','e',':','/','/','/','C',':','/','P','r','o','g','r','a','m',' ','F','i','l','e','s',0}; for(i=0; i<sizeof(TEST_URL_UNESCAPE)/sizeof(TEST_URL_UNESCAPE[0]); i++) { dwEscaped=INTERNET_MAX_URL_LENGTH; @@ -821,9 +821,12 @@ static void test_UrlUnescape(void) dwEscaped = sizeof(inplace); ok(UrlUnescapeA(inplace, NULL, &dwEscaped, URL_UNESCAPE_INPLACE) == S_OK, "UrlUnescapeA failed unexpectedly\n"); + ok(!strcmp(inplace, expected), "got %s expected %s\n", inplace, expected); + ok(dwEscaped == 27, "got %d expected 27\n", dwEscaped); dwEscaped = sizeof(inplaceW); ok(UrlUnescapeW(inplaceW, NULL, &dwEscaped, URL_UNESCAPE_INPLACE) == S_OK, "UrlUnescapeW failed unexpectedly\n"); + ok(dwEscaped == 50, "got %d expected 50\n", dwEscaped); } /* ########################### */
participants (1)
-
Alexandre Julliard