[USER32_APITEST_MENUUI] Don't let rosautotest wait on a test list from user32_apitest_menuui.exe (#8469)

- [USER32_APITEST_MENUUI] Return an empty test list when called with --list
NOTE: The better way to fix this is to move this executable to \reactos\bin\suppl. But that requires some refactoring of tests already in our source tree.
This commit is contained in:
Carl J. Bialorucki
2026-03-23 18:32:52 -05:00
committed by GitHub
parent 8b3663d2b6
commit 20d322fcdc

View File

@@ -103,6 +103,28 @@ wWinMain(HINSTANCE hInstance,
LPWSTR lpCmdLine,
INT nCmdShow)
{
LPCWSTR pszText;
if (lpCmdLine && *lpCmdLine)
{
/* Check if argument is --list, rosautotest is trying to see if this is a test. */
if (wcscmp(L"--list", lpCmdLine) == 0)
{
/* This is a funny hack, but it works and doesn't require special handling. */
printf("Valid test names:\n");
return 0;
}
/* Set window title to the command line argument. */
pszText = lpCmdLine;
}
else
{
/* No command line arguments, set window title to 'user32_apitest_menuui'. */
pszText = L"user32_apitest_menuui";
}
WNDCLASSW wc = { CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS, WindowProc };
wc.hInstance = hInstance;
wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
@@ -112,8 +134,6 @@ wWinMain(HINSTANCE hInstance,
if (!RegisterClassW(&wc))
return 1;
LPCWSTR pszText = (lpCmdLine && lpCmdLine[0]) ? lpCmdLine : L"user32_apitest_menuui";
HMENU hMenu = CreateMyMenuBarMenu();
HWND hwnd = CreateWindowW(CLASSNAME, pszText, WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, CW_USEDEFAULT, 400, 300,