[SHELL32_APITEST] SHParseDisplayName: Add tests for shell:windows\system32 etc. (#7157)

The shell protocol path needs
special parsing. We didn't
implement it correctly.
JIRA issue: CORE-19693
- Add tests for
  shell:windows\system32
  and shell:windows\fonts.
This commit is contained in:
Katayama Hirofumi MZ 2024-07-19 22:41:02 +09:00 committed by GitHub
parent 070d353326
commit c1c91f2a1a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -63,6 +63,8 @@ struct test_data Tests[] =
{__LINE__, L"shell:personal", NULL, CSIDL_MYDOCUMENTS, S_OK, T_PRE_VISTA},
{__LINE__, L"shell:programs", NULL, CSIDL_PROGRAMS, S_OK, T_PRE_VISTA},
{__LINE__, L"shell:programfiles", NULL, CSIDL_PROGRAM_FILES, S_OK, T_PRE_VISTA},
{__LINE__, L"shell:windows\\system32", NULL, CSIDL_SYSTEM, S_OK, T_PRE_VISTA},
{__LINE__, L"shell:windows\\fonts", NULL, CSIDL_FONTS, S_OK, T_PRE_VISTA},
/* The following tests are confusing. They don't work for SHParseDisplayName but work on psfDesktop->ParseDisplayName */
{__LINE__, L"shell:desktop", NULL, 0, HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND), T_VISTA_PLUS},
{__LINE__, L"shell:windows", NULL, 0, HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND), T_VISTA_PLUS},
@ -70,6 +72,8 @@ struct test_data Tests[] =
{__LINE__, L"shell:personal", NULL, 0, HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND), T_VISTA_PLUS},
{__LINE__, L"shell:programs", NULL, 0, HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND), T_VISTA_PLUS},
{__LINE__, L"shell:programfiles", NULL, 0, HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND), T_VISTA_PLUS},
{__LINE__, L"shell:windows\\system32", NULL, 0, HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND), T_VISTA_PLUS},
{__LINE__, L"shell:windows\\fonts", NULL, 0, HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND), T_VISTA_PLUS},
/* Tests for CInternet */
{__LINE__, L"aa:", NULL, 0, E_INVALIDARG, T_PRE_VISTA},
{__LINE__, L"garbage:", NULL, 0, E_INVALIDARG, T_PRE_VISTA},