Commit 1e02c1c3 authored by Alexandre Julliard's avatar Alexandre Julliard

kernel32/tests: Fix the process tests on NT4.

parent d68225eb
...@@ -501,7 +501,7 @@ static void test_Startup(void) ...@@ -501,7 +501,7 @@ static void test_Startup(void)
PROCESS_INFORMATION info; PROCESS_INFORMATION info;
STARTUPINFOA startup,si; STARTUPINFOA startup,si;
static CHAR title[] = "I'm the title string", static CHAR title[] = "I'm the title string",
desktop[] = "I'm the desktop string", desktop[] = "winsta0\\default",
empty[] = ""; empty[] = "";
/* let's start simplistic */ /* let's start simplistic */
...@@ -854,9 +854,9 @@ static void test_CommandLine(void) ...@@ -854,9 +854,9 @@ static void test_CommandLine(void)
assert ( lpFilePart != 0); assert ( lpFilePart != 0);
*(lpFilePart -1 ) = 0; *(lpFilePart -1 ) = 0;
p = strrchr(fullpath, '\\'); p = strrchr(fullpath, '\\');
assert (p);
/* Use exename to avoid buffer containing things like 'C:' */ /* Use exename to avoid buffer containing things like 'C:' */
sprintf(buffer, "..%s/%s tests/process.c %s \"a\\\"b\\\\\" c\\\" d", p, exename, resfile); if (p) sprintf(buffer, "..%s/%s tests/process.c %s \"a\\\"b\\\\\" c\\\" d", p, exename, resfile);
else sprintf(buffer, "./%s tests/process.c %s \"a\\\"b\\\\\" c\\\" d", exename, resfile);
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
ret = CreateProcessA(NULL, buffer, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info); ret = CreateProcessA(NULL, buffer, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info);
ok(ret, "CreateProcess (%s) failed : %d\n", buffer, GetLastError()); ok(ret, "CreateProcess (%s) failed : %d\n", buffer, GetLastError());
...@@ -864,7 +864,8 @@ static void test_CommandLine(void) ...@@ -864,7 +864,8 @@ static void test_CommandLine(void)
ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n"); ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n");
/* child process has changed result file, so let profile functions know about it */ /* child process has changed result file, so let profile functions know about it */
WritePrivateProfileStringA(NULL, NULL, NULL, resfile); WritePrivateProfileStringA(NULL, NULL, NULL, resfile);
sprintf(buffer, "..%s/%s", p, exename); if (p) sprintf(buffer, "..%s/%s", p, exename);
else sprintf(buffer, "./%s", exename);
okChildString("Arguments", "argvA0", buffer); okChildString("Arguments", "argvA0", buffer);
release_memory(); release_memory();
assert(DeleteFileA(resfile) != 0); assert(DeleteFileA(resfile) != 0);
...@@ -875,9 +876,9 @@ static void test_CommandLine(void) ...@@ -875,9 +876,9 @@ static void test_CommandLine(void)
assert ( lpFilePart != 0); assert ( lpFilePart != 0);
*(lpFilePart -1 ) = 0; *(lpFilePart -1 ) = 0;
p = strrchr(fullpath, '\\'); p = strrchr(fullpath, '\\');
assert (p);
/* Use exename to avoid buffer containing things like 'C:' */ /* Use exename to avoid buffer containing things like 'C:' */
sprintf(buffer, "..%s/%s", p, exename); if (p) sprintf(buffer, "..%s/%s", p, exename);
else sprintf(buffer, "./%s", exename);
sprintf(buffer2, "dummy tests/process.c %s \"a\\\"b\\\\\" c\\\" d", resfile); sprintf(buffer2, "dummy tests/process.c %s \"a\\\"b\\\\\" c\\\" d", resfile);
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
ret = CreateProcessA(buffer, buffer2, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info); ret = CreateProcessA(buffer, buffer2, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment