wininet: Add a test for InternetCanonicalizeUrl.

This commit is contained in:
Hans Leidekker 2008-06-29 16:01:20 +02:00 committed by Alexandre Julliard
parent 6796c880fa
commit f1dc1bb070
1 changed files with 10 additions and 0 deletions

View File

@ -73,6 +73,16 @@ static void test_InternetCanonicalizeUrlA(void)
"got %u and %u with size %u for '%s' (%d)\n",
res, GetLastError(), dwSize, buffer, lstrlenA(buffer));
memset(buffer, '#', sizeof(buffer)-1);
buffer[sizeof(buffer)-1] = '\0';
dwSize = sizeof(buffer);
SetLastError(0xdeadbeef);
res = InternetCanonicalizeUrlA("file:///C:/Program%20Files/Atmel/AVR%20Tools/STK500/STK500.xml", buffer, &dwSize, ICU_DECODE | ICU_NO_ENCODE);
ok(res, "InternetCanonicalizeUrlA failed %u\n", GetLastError());
ok(dwSize == lstrlenA(buffer), "got %d expected %d\n", dwSize, lstrlenA(buffer));
todo_wine ok(!lstrcmpA("file://C:\\Program Files\\Atmel\\AVR Tools\\STK500\\STK500.xml", buffer),
"got %s expected 'file://C:\\Program Files\\Atmel\\AVR Tools\\STK500\\STK500.xml'\n", buffer);
/* buffer is larger as the required size */
memset(buffer, '#', sizeof(buffer)-1);
buffer[sizeof(buffer)-1] = '\0';