[PATCH 3/7] kernel32/tests: Add tests for GetLongPathName using a slash delimiter.
Jeremy White
jwhite at codeweavers.com
Mon Dec 21 10:51:54 CST 2015
Signed-off-by: Jeremy White <jwhite at codeweavers.com>
---
dlls/kernel32/tests/path.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/dlls/kernel32/tests/path.c b/dlls/kernel32/tests/path.c
index 4504603..d2048fc 100644
--- a/dlls/kernel32/tests/path.c
+++ b/dlls/kernel32/tests/path.c
@@ -858,6 +858,19 @@ static void test_PathNameA(CHAR *curdir, CHAR curDrive, CHAR otherDrive)
ok(lstrcmpiA(SHORTFILE,strptr)==0,
"GetFullPathNameA returned part '%s' instead of '%s'\n",strptr,SHORTFILE);
}
+ /* Don't Starve relies on GetLongPathName returning the passed in filename,
+ even if the actual file on disk has a different case or separator */
+ if (pGetLongPathNameA) {
+ sprintf(tmpstr,"%s/%s",LONGDIR,LONGFILE);
+ ok(GetLongPathNameA(tmpstr,tmpstr1,MAX_PATH),"GetLongPathNameA failed\n");
+ ok(lstrcmpiA(tmpstr,tmpstr1)==0,
+ "GetLongPathNameA returned '%s' instead of '%s'\n",tmpstr1,tmpstr);
+ sprintf(tmpstr,"%s/%s",SHORTDIR,SHORTFILE);
+ ok(GetLongPathNameA(tmpstr,tmpstr1,MAX_PATH),"GetLongPathNameA failed\n");
+ ok(lstrcmpiA(tmpstr,tmpstr1)==0,
+ "GetLongPathNameA returned '%s' instead of '%s'\n",tmpstr1,tmpstr);
+ }
+
/**/
sprintf(tmpstr,"%c:%s/%s",curdir[0],SHORTDIR,SHORTFILE);
ok(GetFullPathNameA(tmpstr,MAX_PATH,tmpstr1,&strptr),"GetFullPathNameA failed\n");
--
2.1.4
More information about the wine-patches
mailing list