Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
6ec0e71e
Commit
6ec0e71e
authored
Oct 15, 2008
by
Aric Stewart
Committed by
Alexandre Julliard
Oct 16, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Add a test for CreateProcess with an AppName set.
parent
e0edc233
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
1 deletion
+24
-1
process.c
dlls/kernel32/tests/process.c
+24
-1
No files found.
dlls/kernel32/tests/process.c
View file @
6ec0e71e
...
...
@@ -731,6 +731,7 @@ static void test_Startup(void)
static
void
test_CommandLine
(
void
)
{
char
buffer
[
MAX_PATH
],
fullpath
[
MAX_PATH
],
*
lpFilePart
,
*
p
;
char
buffer2
[
MAX_PATH
];
PROCESS_INFORMATION
info
;
STARTUPINFOA
startup
;
DWORD
len
;
...
...
@@ -830,7 +831,29 @@ static void test_CommandLine(void)
okChildString
(
"Arguments"
,
"argvA0"
,
buffer
);
release_memory
();
assert
(
DeleteFileA
(
resfile
)
!=
0
);
/* Using AppName */
get_file_name
(
resfile
);
len
=
GetFullPathNameA
(
selfname
,
MAX_PATH
,
fullpath
,
&
lpFilePart
);
assert
(
lpFilePart
!=
0
);
*
(
lpFilePart
-
1
)
=
0
;
p
=
strrchr
(
fullpath
,
'\\'
);
assert
(
p
);
/* Use exename to avoid buffer containing things like 'C:' */
sprintf
(
buffer
,
"..%s/%s"
,
p
,
exename
);
sprintf
(
buffer2
,
"dummy tests/process.c %s
\"
a
\\\"
b
\\\\\"
c
\\\"
d"
,
resfile
);
SetLastError
(
0xdeadbeef
);
ret
=
CreateProcessA
(
buffer
,
buffer2
,
NULL
,
NULL
,
FALSE
,
0L
,
NULL
,
NULL
,
&
startup
,
&
info
);
ok
(
ret
,
"CreateProcess (%s) failed : %d
\n
"
,
buffer
,
GetLastError
());
/* wait for child to terminate */
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 */
WritePrivateProfileStringA
(
NULL
,
NULL
,
NULL
,
resfile
);
sprintf
(
buffer
,
"tests/process.c %s"
,
resfile
);
okChildString
(
"Arguments"
,
"argvA0"
,
"dummy"
);
okChildString
(
"Arguments"
,
"CommandLineA"
,
buffer2
);
release_memory
();
assert
(
DeleteFileA
(
resfile
)
!=
0
);
}
static
void
test_Directory
(
void
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment