https://git.reactos.org/?p=reactos.git;a=commitdiff;h=de9c32bfed29f76694073…
commit de9c32bfed29f766940735e1fc851692b94d2b54
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Sun Sep 13 00:47:56 2020 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Sun Sep 13 00:47:56 2020 +0900
[SHELL32_APITEST] Strengthen ShellExecuteW testcase (#3165)
Add tests for special folders. CORE-16939
---
.../rostests/apitests/shell32/ShellExecuteW.cpp | 26 ++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/modules/rostests/apitests/shell32/ShellExecuteW.cpp
b/modules/rostests/apitests/shell32/ShellExecuteW.cpp
index 0111783d0e6..b722615df67 100644
--- a/modules/rostests/apitests/shell32/ShellExecuteW.cpp
+++ b/modules/rostests/apitests/shell32/ShellExecuteW.cpp
@@ -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)