From: YeshunYe <yeyeshun@uniontech.com> test for cmd with quotes and whitespaces Signed-off-by: YeshunYe <yeyeshun@uniontech.com> --- dlls/kernelbase/tests/process.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/dlls/kernelbase/tests/process.c b/dlls/kernelbase/tests/process.c index 9217d07bc0c..373e8a587e4 100644 --- a/dlls/kernelbase/tests/process.c +++ b/dlls/kernelbase/tests/process.c @@ -627,6 +627,26 @@ static void test_QueryProcessCycleTime(void) ok( cycles2 > cycles1, "CPU cycles used by process should be increasing.\n" ); } +static void test_CreateProcessInternalW(void) +{ + STARTUPINFOW si; + PROCESS_INFORMATION pi; + WCHAR cmd[] = L"\"c:\\windows\\system32\\tasklist \" /?"; + BOOL ret; + + ZeroMemory(&pi, sizeof(pi)); + ZeroMemory(&si, sizeof(si)); + si.cb = sizeof(si); + + ret = CreateProcessInternalW(NULL, NULL, (LPWSTR)cmd, NULL, NULL, FALSE, + CREATE_NO_WINDOW | DETACHED_PROCESS, + NULL, NULL, &si, &pi, NULL); + todo_wine + ok( ret, "CreateProcessInternalW failed, error %lu.\n", GetLastError() ); + if (pi.hProcess) + wait_child_process(&pi); +} + static void init_funcs(void) { HMODULE hmod = GetModuleHandleA("kernelbase.dll"); @@ -663,4 +683,5 @@ START_TEST(process) test_CreateFileMappingFromApp(); test_MapViewOfFileFromApp(); test_QueryProcessCycleTime(); + test_CreateProcessInternalW(); } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9882