mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
link expansion checks
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32469 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
632f053008
commit
a34befb2f5
1 changed files with 9 additions and 0 deletions
|
@ -271,7 +271,14 @@ int main()
|
|||
NSString *tmpsrc = [tmpdir stringByAppendingPathComponent: @"foo"];
|
||||
|
||||
[fm createDirectoryAtPath: tmpdst attributes: nil];
|
||||
[fm createSymbolicLinkAtPath: tmpsrc pathContent: @"bar"];
|
||||
|
||||
PASS_EQUAL([@"foo" stringByResolvingSymlinksInPath], @"foo",
|
||||
"foo->bar relative symlink not expanded by stringByResolvingSymlinksInPath")
|
||||
|
||||
[fm removeFileAtPath: tmpsrc handler: nil];
|
||||
[fm createSymbolicLinkAtPath: tmpsrc pathContent: tmpdst];
|
||||
|
||||
PASS_EQUAL([tmpsrc stringByStandardizingPath], tmpsrc,
|
||||
"foo->bar symlink not expanded by stringByStandardizingPath")
|
||||
PASS_EQUAL([tmpsrc stringByResolvingSymlinksInPath], tmpdst,
|
||||
|
@ -279,6 +286,8 @@ int main()
|
|||
[fm changeCurrentDirectoryPath: tmpdir];
|
||||
PASS_EQUAL([@"foo" stringByResolvingSymlinksInPath], tmpdst,
|
||||
"foo->bar relative symlink expanded by stringByResolvingSymlinksInPath")
|
||||
PASS(NO == [[@"~" stringByResolvingSymlinksInPath] isEqual: @"~"],
|
||||
"tilde is expanded by stringByResolvingSymlinksInPath")
|
||||
|
||||
[fm changeCurrentDirectoryPath: cwd];
|
||||
[fm removeFileAtPath: tmpdst handler: nil];
|
||||
|
|
Loading…
Reference in a new issue