Damjan Jovanovic : shell32/tests: Test shlexec argv[0], and same-named executables in a different directory.
Alexandre Julliard
julliard at winehq.org
Fri Aug 7 10:42:26 CDT 2020
Module: wine
Branch: stable
Commit: ac77184f8702fc640e7bff4c6b37834a7b1dbc10
URL: https://source.winehq.org/git/wine.git/?a=commit;h=ac77184f8702fc640e7bff4c6b37834a7b1dbc10
Author: Damjan Jovanovic <damjan.jov at gmail.com>
Date: Sun Mar 22 13:46:15 2020 +0200
shell32/tests: Test shlexec argv[0], and same-named executables in a different directory.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=8439
Signed-off-by: Damjan Jovanovic <damjan.jov at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit fe83877cb320c688130c9599838485f40580adf9)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
dlls/shell32/tests/shlexec.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/dlls/shell32/tests/shlexec.c b/dlls/shell32/tests/shlexec.c
index 12ef18c1d8..f881e96b6e 100644
--- a/dlls/shell32/tests/shlexec.c
+++ b/dlls/shell32/tests/shlexec.c
@@ -2828,6 +2828,7 @@ static void test_directory(void)
NULL, "test2.exe", params, NULL, NULL);
okShell(rc > 32, "returned %lu\n", rc);
okChildInt("argcA", 4);
+ todo_wine okChildString("argvA0", path);
okChildString("argvA3", "Exec");
okChildPath("longPath", path);
SetCurrentDirectoryA(curdir);
@@ -2841,6 +2842,7 @@ static void test_directory(void)
NULL, "test2.exe", params, tmpdir, NULL);
okShell(rc > 32, "returned %lu\n", rc);
okChildInt("argcA", 4);
+ todo_wine okChildString("argvA0", path);
okChildString("argvA3", "Exec");
okChildPath("longPath", path);
@@ -2853,6 +2855,7 @@ static void test_directory(void)
NULL, "test2.exe", params, "%TMPDIR%", NULL);
okShell(rc > 32, "returned %lu\n", rc);
okChildInt("argcA", 4);
+ todo_wine okChildString("argvA0", path);
okChildString("argvA3", "Exec");
okChildPath("longPath", path);
@@ -2861,6 +2864,18 @@ static void test_directory(void)
rc=shell_execute_ex(SEE_MASK_NOZONECHECKS|SEE_MASK_FLAG_NO_UI,
NULL, "test2.exe", params, dirpath, NULL);
okShell(rc == SE_ERR_FNF, "returned %lu\n", rc);
+
+ /* Same-named executable in different directory */
+ snprintf(path, ARRAY_SIZE(path), "%s%s", tmpdir, strrchr(argv0, '\\'));
+ CopyFileA(argv0, path, FALSE);
+ rc=shell_execute_ex(SEE_MASK_NOZONECHECKS|SEE_MASK_FLAG_NO_UI,
+ NULL, strrchr(argv0, '\\') + 1, params, tmpdir, NULL);
+ okShell(rc > 32, "returned %lu\n", rc);
+ okChildInt("argcA", 4);
+ todo_wine okChildString("argvA0", path);
+ okChildString("argvA3", "Exec");
+ todo_wine okChildPath("longPath", path);
+ DeleteFileA(path);
}
START_TEST(shlexec)
More information about the wine-cvs
mailing list