[PATCH v2 1/7] kernel32/tests: Add path tests for the unusual ./../foo case.

Jeremy White jwhite at codeweavers.com
Mon Dec 21 15:20:07 CST 2015


Signed-off-by: Jeremy White <jwhite at codeweavers.com>
---
This patch series address issues found in GetLongPathName and GetShortPathName
as reported in bug https://bugs.winehq.org/show_bug.cgi?id=36859.
Thanks to Dmitry for pointing out GetShortPathName should be checked as well
and for the suggestion to use CheckNameLegalDOS8Dot3W.
---
v2: Mark new failing tests with todo_wine; thanks Sebastian.
---
 dlls/kernel32/tests/path.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/dlls/kernel32/tests/path.c b/dlls/kernel32/tests/path.c
index 85c4ec3..e90a260 100644
--- a/dlls/kernel32/tests/path.c
+++ b/dlls/kernel32/tests/path.c
@@ -2136,6 +2136,17 @@ static void test_relative_path(void)
     ok(ret, "GetShortPathName error %d\n", GetLastError());
     ok(!strcmp(buf, "..\\foo\\file"), "expected ..\\foo\\file, got %s\n", buf);
 
+    strcpy(buf, "deadbeef");
+    ret = pGetLongPathNameA(".\\..\\foo\\file", buf, MAX_PATH);
+    todo_wine
+    ok(ret, "GetLongPathName error %d\n", GetLastError());
+    todo_wine
+    ok(!strcmp(buf, ".\\..\\foo\\file"), "expected .\\..\\foo\\file, got %s\n", buf);
+    strcpy(buf, "deadbeef");
+    ret = GetShortPathNameA(".\\..\\foo\\file", buf, MAX_PATH);
+    ok(ret, "GetShortPathName error %d\n", GetLastError());
+    ok(!strcmp(buf, ".\\..\\foo\\file"), "expected .\\..\\foo\\file, got %s\n", buf);
+
     SetCurrentDirectoryA("..");
     DeleteFileA("foo\\file");
     RemoveDirectoryA("foo");
-- 
2.1.4




More information about the wine-patches mailing list