Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
457ece15
Commit
457ece15
authored
Oct 27, 2005
by
Uwe Bonnes
Committed by
Alexandre Julliard
Oct 27, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test for argv handling.
parent
e1008c38
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
1 deletion
+45
-1
process.c
dlls/kernel/tests/process.c
+45
-1
No files found.
dlls/kernel/tests/process.c
View file @
457ece15
...
...
@@ -693,9 +693,10 @@ static void test_Startup(void)
static
void
test_CommandLine
(
void
)
{
char
buffer
[
MAX_PATH
];
char
buffer
[
MAX_PATH
]
,
fullpath
[
MAX_PATH
],
*
lpFilePart
,
*
p
;
PROCESS_INFORMATION
info
;
STARTUPINFOA
startup
;
DWORD
len
;
memset
(
&
startup
,
0
,
sizeof
(
startup
));
startup
.
cb
=
sizeof
(
startup
);
...
...
@@ -740,6 +741,49 @@ static void test_CommandLine(void)
okChildString
(
"Arguments"
,
"CommandLineA"
,
buffer
);
release_memory
();
assert
(
DeleteFileA
(
resfile
)
!=
0
);
/* Test for Bug1330 to show that XP doesn't change '/' to '\\' in argv[0]*/
get_file_name
(
resfile
);
sprintf
(
buffer
,
"./%s tests/process.c %s
\"
a
\\\"
b
\\\\\"
c
\\\"
d"
,
selfname
,
resfile
);
ok
(
CreateProcessA
(
NULL
,
buffer
,
NULL
,
NULL
,
FALSE
,
0L
,
NULL
,
NULL
,
&
startup
,
&
info
),
"CreateProcess
\n
"
);
/* 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
,
"./%s"
,
selfname
);
okChildString
(
"Arguments"
,
"argvA0"
,
buffer
);
release_memory
();
assert
(
DeleteFileA
(
resfile
)
!=
0
);
get_file_name
(
resfile
);
sprintf
(
buffer
,
".
\\
%s tests/process.c %s
\"
a
\\\"
b
\\\\\"
c
\\\"
d"
,
selfname
,
resfile
);
ok
(
CreateProcessA
(
NULL
,
buffer
,
NULL
,
NULL
,
FALSE
,
0L
,
NULL
,
NULL
,
&
startup
,
&
info
),
"CreateProcess
\n
"
);
/* 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
,
".
\\
%s"
,
selfname
);
okChildString
(
"Arguments"
,
"argvA0"
,
buffer
);
release_memory
();
assert
(
DeleteFileA
(
resfile
)
!=
0
);
get_file_name
(
resfile
);
len
=
GetFullPathNameA
(
selfname
,
MAX_PATH
,
fullpath
,
&
lpFilePart
);
assert
(
lpFilePart
!=
0
);
*
(
lpFilePart
-
1
)
=
0
;
p
=
strrchr
(
fullpath
,
'\\'
);
assert
(
p
);
sprintf
(
buffer
,
"..%s/%s tests/process.c %s
\"
a
\\\"
b
\\\\\"
c
\\\"
d"
,
p
,
selfname
,
resfile
);
ok
(
CreateProcessA
(
NULL
,
buffer
,
NULL
,
NULL
,
FALSE
,
0L
,
NULL
,
NULL
,
&
startup
,
&
info
),
"CreateProcess
\n
"
);
/* 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
,
"..%s/%s"
,
p
,
selfname
);
okChildString
(
"Arguments"
,
"argvA0"
,
buffer
);
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