From: Tingzhong Luo luotingzhong@uniontech.com
Signed-off-by: Tingzhong Luo luotingzhong@uniontech.com --- dlls/shell32/tests/shellpath.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
diff --git a/dlls/shell32/tests/shellpath.c b/dlls/shell32/tests/shellpath.c index 2d9450652a1..8bec114af09 100644 --- a/dlls/shell32/tests/shellpath.c +++ b/dlls/shell32/tests/shellpath.c @@ -1974,6 +1974,20 @@ if (0) { /* crashes */ todo_wine ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got 0x%08lx\n", hr); ok(path == NULL, "path set\n"); #endif + + /* check UserProgramFiles */ + path = NULL; + hr = pSHGetKnownFolderPath(&FOLDERID_UserProgramFiles, 0, NULL, &path); + ok(hr == S_OK, "expected S_OK, got 0x%08lx\n", hr); + ok(path != NULL, "path not set\n"); + trace("FOLDERID_UserProgramFiles -> %s\n", wine_dbgstr_w(path)); + path2 = NULL; + len = ExpandEnvironmentStringsW(L"%LOCALAPPDATA%\Programs", NULL, -1); + path2 = CoTaskMemAlloc(sizeof(WCHAR) * (len + 1)); + ExpandEnvironmentStringsW(L"%LOCALAPPDATA%\Programs", path2, len); + ok(!StrCmpW(path, path2), "expected equal paths\n"); + CoTaskMemFree(path); + CoTaskMemFree(path2); }
static BOOL is_in_strarray(const WCHAR *needle, const char *hay)