Paul Vriens : shell32/tests: Fix test failures on Win95.
Alexandre Julliard
julliard at winehq.org
Fri Jun 5 08:56:59 CDT 2009
Module: wine
Branch: master
Commit: e348c842da433d503282c841f333c1902083b0fa
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e348c842da433d503282c841f333c1902083b0fa
Author: Paul Vriens <Paul.Vriens.Wine at gmail.com>
Date: Fri Jun 5 13:08:37 2009 +0200
shell32/tests: Fix test failures on Win95.
---
dlls/shell32/tests/shlexec.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/dlls/shell32/tests/shlexec.c b/dlls/shell32/tests/shlexec.c
index 216c6d0..469e79f 100644
--- a/dlls/shell32/tests/shlexec.c
+++ b/dlls/shell32/tests/shlexec.c
@@ -864,7 +864,8 @@ static void test_find_executable(void)
ok(rc == SE_ERR_NOASSOC /* >= win2000 */ || rc > 32 /* win98, nt4 */, "FindExecutable(NULL) returned %ld\n", rc);
ok(strcmp(command, "your word") != 0, "FindExecutable(NULL) returned command=[%s]\n", command);
- sprintf(filename, "%s\\test file.sfe", tmpdir);
+ /* Win95 can't cope with double backslashes in FindExecutableA (tmpdir has a trailing backslash) */
+ sprintf(filename, "%stest file.sfe", tmpdir);
rc=(INT_PTR)FindExecutableA(filename, NULL, command);
ok(rc > 32, "FindExecutable(%s) returned %ld\n", filename, rc);
/* Depending on the platform, command could be '%1' or 'test file.sfe' */
@@ -910,6 +911,10 @@ static void test_find_executable(void)
test=filename_tests;
while (test->basename)
{
+ /* Win95 can't cope with double slashes/backslashes in FindExecutableA */
+ if (tmpdir[strlen(tmpdir) - 1] == '\\')
+ tmpdir[strlen(tmpdir) - 1] = 0;
+
sprintf(filename, test->basename, tmpdir);
if (strchr(filename, '/'))
{
More information about the wine-cvs
mailing list