[PATCH 1/7] kernel32/tests: Add path tests for the unusual ./../foo case.
Jeremy White
jwhite at codeweavers.com
Mon Dec 21 10:51:52 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.
---
dlls/kernel32/tests/path.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/dlls/kernel32/tests/path.c b/dlls/kernel32/tests/path.c
index 85c4ec3..4504603 100644
--- a/dlls/kernel32/tests/path.c
+++ b/dlls/kernel32/tests/path.c
@@ -2136,6 +2136,15 @@ 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);
+ ok(ret, "GetLongPathName error %d\n", GetLastError());
+ 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