Francois Gouget : shell32/tests: On NT4 FindExecutable() returns an extra backspace character in some tests.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Apr 3 06:48:33 CDT 2007


Module: wine
Branch: master
Commit: 996ced19816c819ad21dbd859a6d0b86c4cc8e93
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=996ced19816c819ad21dbd859a6d0b86c4cc8e93

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Mon Apr  2 19:38:15 2007 +0200

shell32/tests: On NT4 FindExecutable() returns an extra backspace character in some tests.

---

 dlls/shell32/tests/shlexec.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/dlls/shell32/tests/shlexec.c b/dlls/shell32/tests/shlexec.c
index 849c275..f16cb72 100644
--- a/dlls/shell32/tests/shlexec.c
+++ b/dlls/shell32/tests/shlexec.c
@@ -774,14 +774,18 @@ static void test_find_executable(void)
         }
         if (rc > 32)
         {
+            int equal;
+            equal=strcmp(command, argv0) == 0 ||
+                /* NT4 returns an extra 0x8 character! */
+                (strlen(command) == strlen(argv0)+1 && strncmp(command, argv0, strlen(argv0)) == 0);
             if ((test->todo & 0x20)==0)
             {
-                ok(strcmp(command, argv0) == 0, "FindExecutable(%s) returned command='%s' instead of '%s'\n",
+                ok(equal, "FindExecutable(%s) returned command='%s' instead of '%s'\n",
                    filename, command, argv0);
             }
             else todo_wine
             {
-                ok(strcmp(command, argv0) == 0, "FindExecutable(%s) returned command='%s' instead of '%s'\n",
+                ok(equal, "FindExecutable(%s) returned command='%s' instead of '%s'\n",
                    filename, command, argv0);
             }
         }




More information about the wine-cvs mailing list