mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
Disable tilde abbreviation test on Windows
This commit is contained in:
parent
98ff5d2a16
commit
2e65ee34f1
1 changed files with 9 additions and 3 deletions
|
@ -32,8 +32,10 @@ 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
|
||||
#if defined(_WIN32)
|
||||
SKIP("multiple slashes can't be removed on Windows")
|
||||
#else
|
||||
/* This test can't work on windows, because the home directory of a
|
||||
* user doesn't start with a slash... don't run it on _WIN32
|
||||
*/
|
||||
tmp = [NSString stringWithFormat: @"////%@//Documents///", home];
|
||||
|
@ -52,9 +54,12 @@ int main()
|
|||
END_SET("tilde")
|
||||
|
||||
START_SET("tilde abbreviation for other home")
|
||||
|
||||
#if defined(_WIN32)
|
||||
SKIP("tilde abbreviation test not implemented on Windows")
|
||||
#else
|
||||
NSString *home = NSHomeDirectory();
|
||||
NSString *tmp;
|
||||
|
||||
/* The idea here is to use a home directory for a user other than the
|
||||
* current one. We pick root as a user which will exist on most systems.
|
||||
* If the current user is root then this will not work, so we skip the
|
||||
|
@ -71,6 +76,7 @@ int main()
|
|||
}
|
||||
PASS_EQUAL([tmp stringByAbbreviatingWithTildeInPath], tmp,
|
||||
"tilde does nothing for root's home");
|
||||
#endif
|
||||
|
||||
END_SET("tilde abbreviation for other home")
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue