shlwapi: Additional UrlEscapeA tests.

This commit is contained in:
Lei Zhang 2008-01-09 13:41:55 -08:00 committed by Alexandre Julliard
parent c565a8382a
commit 0da7c8f444

View file

@ -454,12 +454,37 @@ static void test_url_canonicalize(const char *szUrl, DWORD dwFlags, HRESULT dwEx
static void test_UrlEscape(void)
{
DWORD size;
DWORD size = 0;
HRESULT ret;
unsigned int i;
char empty_string[] = "";
ret = UrlEscapeA("/woningplan/woonkamer basis.swf", NULL, &size, URL_ESCAPE_SPACES_ONLY);
ok(ret == E_INVALIDARG, "got %x, expected %x\n", ret, E_INVALIDARG);
todo_wine {
ok(size == 0, "got %d, expected %d\n", size, 0);
}
size = 0;
ret = UrlEscapeA("/woningplan/woonkamer basis.swf", empty_string, &size, URL_ESCAPE_SPACES_ONLY);
ok(ret == E_INVALIDARG, "got %x, expected %x\n", ret, E_INVALIDARG);
todo_wine {
ok(size == 0, "got %d, expected %d\n", size, 0);
}
size = 1;
ret = UrlEscapeA("/woningplan/woonkamer basis.swf", NULL, &size, URL_ESCAPE_SPACES_ONLY);
ok(ret == E_INVALIDARG, "got %x, expected %x\n", ret, E_INVALIDARG);
todo_wine {
ok(size == 1, "got %d, expected %d\n", size, 1);
}
size = 1;
ret = UrlEscapeA("/woningplan/woonkamer basis.swf", empty_string, &size, URL_ESCAPE_SPACES_ONLY);
todo_wine {
ok(ret == E_POINTER, "got %x, expected %x\n", ret, E_POINTER);
}
ok(size == 34, "got %d, expected %d\n", size, 34);
for(i=0; i<sizeof(TEST_ESCAPE)/sizeof(TEST_ESCAPE[0]); i++) {
test_url_escape(TEST_ESCAPE[i].url, TEST_ESCAPE[i].flags,