Re: [PATCH 1/7] kernel32/tests: Add path tests for the unusual ./../foo case.
On 21.12.2015 17:51, Jeremy White wrote:
Signed-off-by: Jeremy White <jwhite(a)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");
The patch causes test failures here: ../../../tools/runtest -q -P wine -T ../../.. -M kernel32.dll -p kernel32_test.exe.so path && touch path.ok path.c:2141: Test failed: GetLongPathName error 2 path.c:2142: Test failed: expected .\..\foo\file, got deadbeef [...] After applying all patches those are gone. Is todo_wine missing maybe?
participants (1)
-
Sebastian Lackner