From 2b3c19fe55b24df002a4bcf3f754bc586631fd99 Mon Sep 17 00:00:00 2001 From: Peter Beutner Date: Mon, 6 Aug 2007 15:34:20 +0200 Subject: [PATCH] msvcrt: Add _makepath() tests. --- dlls/msvcrt/tests/dir.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/dlls/msvcrt/tests/dir.c b/dlls/msvcrt/tests/dir.c index 009cbdb61fe..f3c4d08fa6c 100644 --- a/dlls/msvcrt/tests/dir.c +++ b/dlls/msvcrt/tests/dir.c @@ -31,6 +31,22 @@ #include #include +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(); }