shell32/tests: Add more tests for SHGetKnownFolderIDList.

Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
oldstable
Jactry Zeng 2017-08-14 21:34:10 +08:00 committed by Alexandre Julliard
parent 5451c7d04f
commit d71bc1503b
1 changed files with 26 additions and 2 deletions

View File

@ -2781,9 +2781,33 @@ if (0) { /* crashes on native */
hr = pSHGetKnownFolderIDList(&FOLDERID_Desktop, 0, NULL, NULL);
ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
pidl = (void*)0xdeadbeef;
hr = pSHGetKnownFolderIDList(&FOLDERID_Desktop, 0, NULL, &pidl);
ok(hr == S_OK, "got 0x%08x\n", hr);
CoTaskMemFree(pidl);
ok(hr == S_OK, "SHGetKnownFolderIDList failed: 0x%08x\n", hr);
ok(ILIsEmpty(pidl), "pidl should be empty.\n");
ok(pidl->mkid.cb == 0, "get wrong value: %d\n", pidl->mkid.cb);
ILFree(pidl);
pidl = (void*)0xdeadbeef;
hr = pSHGetKnownFolderIDList(&FOLDERID_Desktop, KF_FLAG_NO_ALIAS, NULL, &pidl);
ok(hr == S_OK, "SHGetKnownFolderIDList failed: 0x%08x\n", hr);
todo_wine ok(!ILIsEmpty(pidl), "pidl should not be empty.\n");
todo_wine ok(pidl->mkid.cb == 20, "get wrong value: %d\n", pidl->mkid.cb);
ILFree(pidl);
pidl = (void*)0xdeadbeef;
hr = pSHGetKnownFolderIDList(&FOLDERID_Documents, 0, NULL, &pidl);
ok(hr == S_OK, "SHGetKnownFolderIDList failed: 0x%08x\n", hr);
ok(!ILIsEmpty(pidl), "pidl should not be empty.\n");
ok(pidl->mkid.cb == 20, "get wrong value: %d\n", pidl->mkid.cb);
ILFree(pidl);
pidl = (void*)0xdeadbeef;
hr = pSHGetKnownFolderIDList(&FOLDERID_Documents, KF_FLAG_NO_ALIAS, NULL, &pidl);
ok(hr == S_OK, "SHGetKnownFolderIDList failed: 0x%08x\n", hr);
ok(!ILIsEmpty(pidl), "pidl should not be empty.\n");
ok(pidl->mkid.cb == 20, "get wrong value: %d\n", pidl->mkid.cb);
ILFree(pidl);
}
START_TEST(shellpath)