mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
Apply patch for bug #32899
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32794 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e8aee2c889
commit
49b2b9c764
3 changed files with 38 additions and 2 deletions
|
@ -10,6 +10,7 @@ int main()
|
|||
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||
NSFileManager *mgr = [NSFileManager defaultManager];
|
||||
NSString *dir = @"NSFileManagerTestDir";
|
||||
NSString *dirInDir = [@"TestDirectory" stringByAppendingPathComponent: @"WithinDirectory"];
|
||||
NSString *str1,*str2;
|
||||
PASS(mgr != nil && [mgr isKindOfClass: [NSFileManager class]],
|
||||
"NSFileManager understands +defaultManager");
|
||||
|
@ -135,6 +136,24 @@ NSLog(@"'%@', '%@'", NSUserName(), [attr fileOwnerAccountName]);
|
|||
|
||||
PASS([mgr changeCurrentDirectoryPath: @"subdir"],
|
||||
"NSFileManager can move into subdir");
|
||||
|
||||
{
|
||||
BOOL isDir;
|
||||
PASS([mgr createDirectoryAtPath: dirInDir
|
||||
withIntermediateDirectories: NO
|
||||
attributes: nil
|
||||
error: NULL] == NO,
|
||||
"NSFileManager refuses to create non-existent intermediate directories withIntermediateDirectories == NO");
|
||||
|
||||
PASS([mgr createDirectoryAtPath: dirInDir
|
||||
withIntermediateDirectories: YES
|
||||
attributes: nil
|
||||
error: NULL],
|
||||
"NSFileManager can create intermediate directories withIntermediateDirectories == YES");
|
||||
PASS([mgr fileExistsAtPath: dirInDir isDirectory: &isDir] && isDir == YES,
|
||||
"NSFileManager create directory and intermediate directory that actually exist");
|
||||
|
||||
}
|
||||
|
||||
PASS_EXCEPTION([mgr removeFileAtPath: @"." handler: nil];,
|
||||
NSInvalidArgumentException,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue