Peter Beutner : msvcrt: Add _makepath() tests.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Aug 7 08:26:22 CDT 2007


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

Author: Peter Beutner <p.beutner at gmx.net>
Date:   Mon Aug  6 15:34:20 2007 +0200

msvcrt: Add _makepath() tests.

---

 dlls/msvcrt/tests/dir.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/dlls/msvcrt/tests/dir.c b/dlls/msvcrt/tests/dir.c
index 009cbdb..f3c4d08 100644
--- a/dlls/msvcrt/tests/dir.c
+++ b/dlls/msvcrt/tests/dir.c
@@ -31,6 +31,22 @@
 #include <process.h>
 #include <errno.h>
 
+static void test_makepath(void)
+{
+    char buffer[MAX_PATH];
+
+    _makepath(buffer, "C", "\\foo", "dummy", "txt");
+    ok( strcmp(buffer, "C:\\foo\\dummy.txt") == 0, "unexpected result: %s\n", buffer);
+    _makepath(buffer, "C:", "\\foo\\", "dummy", ".txt");
+    ok( strcmp(buffer, "C:\\foo\\dummy.txt") == 0, "unexpected result: %s\n", buffer);
+
+    /* this works with native and e.g. Freelancer depends on it */
+    strcpy(buffer, "foo");
+    _makepath(buffer, NULL, buffer, "dummy.txt", NULL);
+    todo_wine { ok( strcmp(buffer, "foo\\dummy.txt") == 0,
+                    "unexpected result: %s\n", buffer); }
+}
+
 static void test_fullpath(void)
 {
     char full[MAX_PATH];
@@ -91,4 +107,5 @@ static void test_fullpath(void)
 START_TEST(dir)
 {
     test_fullpath();
+    test_makepath();
 }




More information about the wine-cvs mailing list