shell32/tests: Check ShellExecute is looking in the correct current directory.
This commit is contained in:
parent
ae70b66dce
commit
c6fa51a949
1 changed files with 9 additions and 0 deletions
|
@ -2266,6 +2266,8 @@ static void test_exes(void)
|
|||
{
|
||||
char filename[2 * MAX_PATH + 17];
|
||||
char params[1024];
|
||||
char curdir[MAX_PATH];
|
||||
char *basename = strrchr(argv0, '\\') + 1;
|
||||
INT_PTR rc;
|
||||
|
||||
sprintf(params, "shlexec \"%s\" Exec", child_file);
|
||||
|
@ -2353,6 +2355,13 @@ static void test_exes(void)
|
|||
"notaverb", argv0, NULL, NULL, NULL);
|
||||
todo_wine okShell(rc == SE_ERR_NOASSOC, "returned %Iu\n", rc);
|
||||
|
||||
/* Check the correct search path is used */
|
||||
GetCurrentDirectoryA(MAX_PATH, curdir);
|
||||
SetCurrentDirectoryA(tmpdir);
|
||||
rc = shell_execute(NULL, basename, params, NULL);
|
||||
todo_wine okShell(rc == SE_ERR_FNF, "returned %Iu\n", rc);
|
||||
SetCurrentDirectoryA(curdir);
|
||||
|
||||
if (!skip_shlexec_tests)
|
||||
{
|
||||
/* A class overrides the normal handling of executables too */
|
||||
|
|
Loading…
Add table
Reference in a new issue