fixes for tilde handling on windows

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39466 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2016-03-05 17:28:06 +00:00
parent b1bc2f8af7
commit 9fbe3bafef
3 changed files with 13 additions and 3 deletions

View file

@ -32,9 +32,14 @@ int main()
PASS_EQUAL([tmp stringByAbbreviatingWithTildeInPath], @"~/Documents/./..",
"dot directory reference retained");
#ifndef _WIN32
/* This test can't work on windows, because the ome directory of a
* user doesn't start with a slash... don't run it on _WIN32
*/
tmp = [NSString stringWithFormat: @"////%@//Documents///", home];
PASS_EQUAL([tmp stringByAbbreviatingWithTildeInPath], @"~/Documents",
"multiple slashes removed");
#endif
PASS_EQUAL([@"//////Documents///" stringByAbbreviatingWithTildeInPath],
@"/Documents",