From: Amine Khaldi Date: Sat, 25 Apr 2015 10:56:44 +0000 (+0000) Subject: [SHDOCVW_WINETEST] Sync with Wine Staging 1.7.37. CORE-9246 X-Git-Tag: backups/colins-printing-for-freedom@73041~219 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=65a3bbb546d8d4a08d83d2181e69de8c2762c2aa [SHDOCVW_WINETEST] Sync with Wine Staging 1.7.37. CORE-9246 svn path=/trunk/; revision=67397 --- diff --git a/rostests/winetests/shdocvw/shdocvw.c b/rostests/winetests/shdocvw/shdocvw.c index 3bdceb57287..50ee9a38630 100644 --- a/rostests/winetests/shdocvw/shdocvw.c +++ b/rostests/winetests/shdocvw/shdocvw.c @@ -212,13 +212,13 @@ static void test_ParseURLFromOutsideSourceA(void) buffer[sizeof(buffer)-1] = '\0'; len = sizeof(buffer); dummy = 0; - /* on success, len+1 is returned. No idea, if someone depend on this */ + /* on success, string size including terminating 0 is returned for ansi version */ res = pParseURLFromOutsideSourceA(ParseURL_table[i].url, buffer, &len, &dummy); /* len does not include the terminating 0, when buffer is large enough */ - ok( res != 0 && len == ParseURL_table[i].len && + ok( res == (ParseURL_table[i].len+1) && len == ParseURL_table[i].len && !lstrcmpA(buffer, ParseURL_table[i].newurl), - "#%d: got %d and %d with '%s' (expected '!=0' and %d with '%s')\n", - i, res, len, buffer, ParseURL_table[i].len, ParseURL_table[i].newurl); + "#%d: got %d and %d with '%s' (expected %d and %d with '%s')\n", + i, res, len, buffer, ParseURL_table[i].len+1, ParseURL_table[i].len, ParseURL_table[i].newurl); /* use the size test only for the first examples */ @@ -308,11 +308,12 @@ static void test_ParseURLFromOutsideSourceW(void) /* len is in characters */ len = sizeof(bufferW)/sizeof(bufferW[0]); dummy = 0; + /* on success, 1 is returned for unicode version */ res = pParseURLFromOutsideSourceW(urlW, bufferW, &len, &dummy); WideCharToMultiByte(CP_ACP, 0, bufferW, -1, bufferA, sizeof(bufferA), NULL, NULL); - ok( res != 0 && len == ParseURL_table[0].len && + ok( res == 1 && len == ParseURL_table[0].len && !lstrcmpA(bufferA, ParseURL_table[0].newurl), - "got %d and %d with '%s' (expected '!=0' and %d with '%s')\n", + "got %d and %d with '%s' (expected 1 and %d with '%s')\n", res, len, bufferA, ParseURL_table[0].len, ParseURL_table[0].newurl);