Jactry Zeng : shell32/tests: Add more tests for SHGetKnownFolderIDList.
Alexandre Julliard
julliard at winehq.org
Wed Aug 16 09:06:25 CDT 2017
Module: wine
Branch: master
Commit: d71bc1503b0d8786a595db19956afb846e5e1b7d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d71bc1503b0d8786a595db19956afb846e5e1b7d
Author: Jactry Zeng <jzeng at codeweavers.com>
Date: Mon Aug 14 21:34:10 2017 +0800
shell32/tests: Add more tests for SHGetKnownFolderIDList.
Signed-off-by: Jactry Zeng <jzeng at codeweavers.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/shell32/tests/shellpath.c | 28 ++++++++++++++++++++++++++--
1 file changed, 26 insertions(+), 2 deletions(-)
diff --git a/dlls/shell32/tests/shellpath.c b/dlls/shell32/tests/shellpath.c
index 3292c54..9fea876 100644
--- a/dlls/shell32/tests/shellpath.c
+++ b/dlls/shell32/tests/shellpath.c
@@ -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)
More information about the wine-cvs
mailing list