164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
|
_testFileIRI.fileSystemRepresentation, nil]));
}
- (void)testChangeCurrentDirectoryPath
{
OFString *oldDirectoryPath = _fileManager.currentDirectoryPath;
[_fileManager changeCurrentDirectoryPath:
_testsDirectoryIRI.fileSystemRepresentation];
OTAssertEqualObjects(_fileManager.currentDirectoryPath,
_testsDirectoryIRI.fileSystemRepresentation);
[_fileManager changeCurrentDirectoryPath: oldDirectoryPath];
}
@end
|
>
>
>
>
|
|
|
>
>
>
>
|
|
>
|
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
|
_testFileIRI.fileSystemRepresentation, nil]));
}
- (void)testChangeCurrentDirectoryPath
{
OFString *oldDirectoryPath = _fileManager.currentDirectoryPath;
OTAssertFalse([_fileManager fileExistsAtPath: @"test.txt"]);
[_fileManager changeCurrentDirectoryPath:
_testsDirectoryIRI.fileSystemRepresentation];
@try {
/*
* We can't check whether currentDirectoryPath is
* _testsDirectoryIRI.fileSystemRepresentation because they
* could be different due to symlinks. Therefore check for
* presence of test.txt instead.
*/
OTAssertTrue([_fileManager fileExistsAtPath: @"test.txt"]);
} @finally {
[_fileManager changeCurrentDirectoryPath: oldDirectoryPath];
}
}
@end
|