mirror of
https://github.com/reactos/reactos.git
synced 2024-06-30 01:42:30 +00:00
[SHELL32_APITEST] Strengthen ShellExecuteW testcase (#3165)
Add tests for special folders. CORE-16939
This commit is contained in:
parent
61192390cf
commit
de9c32bfed
|
@ -119,6 +119,32 @@ START_TEST(ShellExecuteW)
|
|||
hWnd = FindWindowW(L"CabinetWClass", L"Search Results");
|
||||
PostMessage(hWnd, WM_SYSCOMMAND, SC_CLOSE, 0);
|
||||
}
|
||||
|
||||
// TEST #7: Open My Documents ("::{450d8fba-ad25-11d0-98a8-0800361b1103}")
|
||||
hInstance = ShellExecuteW(NULL, NULL, L"::{450d8fba-ad25-11d0-98a8-0800361b1103}", NULL, NULL, SW_SHOWNORMAL);
|
||||
ret = (INT)(UINT_PTR)hInstance;
|
||||
ok(ret > 31, "TEST #7: ret:%d, LastError: %ld\n", ret, GetLastError());
|
||||
trace("TEST #7 ret: %d.\n", ret);
|
||||
if (hInstance)
|
||||
{
|
||||
Sleep(WAIT_SLEEP);
|
||||
// Terminate Window
|
||||
hWnd = FindWindowW(L"CabinetWClass", NULL);
|
||||
PostMessage(hWnd, WM_SYSCOMMAND, SC_CLOSE, 0);
|
||||
}
|
||||
|
||||
// TEST #8: Open My Documents ("shell:::{450d8fba-ad25-11d0-98a8-0800361b1103}")
|
||||
hInstance = ShellExecuteW(NULL, L"open", L"shell:::{450d8fba-ad25-11d0-98a8-0800361b1103}", NULL, NULL, SW_SHOWNORMAL);
|
||||
ret = (INT)(UINT_PTR)hInstance;
|
||||
ok(ret > 31, "TEST #8: ret:%d, LastError: %ld\n", ret, GetLastError());
|
||||
trace("TEST #8 ret: %d.\n", ret);
|
||||
if (hInstance)
|
||||
{
|
||||
Sleep(WAIT_SLEEP);
|
||||
// Terminate Window
|
||||
hWnd = FindWindowW(L"CabinetWClass", NULL);
|
||||
PostMessage(hWnd, WM_SYSCOMMAND, SC_CLOSE, 0);
|
||||
}
|
||||
}
|
||||
|
||||
// Windows Server 2003 and Windows XP SP3 return values (Win 7 returns 42 in all cases)
|
||||
|
|
Loading…
Reference in a new issue